Adding log message if cwd fails
@@ -556,7 +556,11 @@ impl AppRegistry {
// auxiliary files with relative file paths
let cwd = ::std::env::current_dir()?;
let parent_dir = app_path.parent().unwrap_or(&cwd);
- let _ = ::std::env::set_current_dir(parent_dir);
+ if let Err(err) = ::std::env::set_current_dir(parent_dir) {
+ // If we can't change the current directory, we'll log an error and then just
+ // continue trying to execute the application
+ warn!("Failed to set cwd before executing {}: {:?}", app_name, err);
+ }
let mut cmd = Command::new(app_path);
