From 3aceaaaa625769294479b5e8dae917e1c16ba7f7 Mon Sep 17 00:00:00 2001 From: Keith Simmons Date: Sun, 10 Jan 2021 23:32:34 -0800 Subject: [PATCH] fix formatting --- src/main.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 50c69c0..e2508c5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -141,7 +141,11 @@ fn main() { "(source /etc/profile && source {} && echo $PATH)", profile_path.to_str().unwrap() ); - if let Ok(path) = std::process::Command::new(shell).arg("-c").arg(cmd).output() { + if let Ok(path) = std::process::Command::new(shell) + .arg("-c") + .arg(cmd) + .output() + { env::set_var("PATH", std::str::from_utf8(&path.stdout).unwrap()); } }