aboutsummaryrefslogtreecommitdiff
path: root/launcher/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'launcher/src/main.rs')
-rw-r--r--launcher/src/main.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/launcher/src/main.rs b/launcher/src/main.rs
index 3a961a0..93c996b 100644
--- a/launcher/src/main.rs
+++ b/launcher/src/main.rs
@@ -112,9 +112,8 @@ fn main() {
show_system_info();
println!("atomic-launcher: Compiled against rustc {}", rustc_version_runtime::version());
- let exec_path = std::env::current_exe();
- let work_dir = exec_path.as_ref().map(|p| p.parent()).ok()
- .unwrap_or(Some(Path::new("/")))
+ let exec_path = std::env::current_exe().ok();
+ let work_dir = exec_path.as_ref().and_then(|p| p.parent())
.unwrap_or(Path::new("/"));
println!("atomic-launcher: Current directory: {}", work_dir