diff options
-rw-r--r-- | src/main.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs index e0d42f9..9f20a01 100644 --- a/src/main.rs +++ b/src/main.rs @@ -21,11 +21,13 @@ struct Args { async fn main() -> Result<(), Box<dyn Error>> { pretty_env_logger::init(); let args = Args::parse(); + let display = env::var("DISPLAY")?; info!("Current directory: {}", env::current_dir()?.display()); fs::create_dir(PROFILE_ROOT).ok(); let mut geckodriver = Command::new("geckodriver") .env("MOZ_REMOTE_SETTINGS_DEVTOOLS", "1") + .env("DISPLAY", display) .arg("--profile-root").arg("/tmp/geckodriver-dashboard").spawn()?; let c = ClientBuilder::native().connect("http://localhost:4444").await.expect("failed to connect to WebDriver"); @@ -43,6 +45,7 @@ async fn main() -> Result<(), Box<dyn Error>> { fs::write(&tmp_path, img)?; fs::rename(&tmp_path, output_path)?; time::sleep(Duration::from_secs(15)).await; + info!("Wrote {}", output_path.display()); } // c.close().await?; |