diff options
Diffstat (limited to 'src/run')
| -rw-r--r-- | src/run/mod.rs | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/run/mod.rs b/src/run/mod.rs index 5a8370f..c7f4408 100644 --- a/src/run/mod.rs +++ b/src/run/mod.rs @@ -218,15 +218,7 @@ impl Executor { command.stdin(stdin); command.stdout(stdout); - // TODO: move to export_fun.rs? - if let Some(sr) = self.se.lock().unwrap().socket_running.as_ref() { - let my_path = std::env::var_os("PATH").expect("no PATH - seriously?"); - let mut new_path = sr.path().as_os_str().as_bytes().to_vec(); - new_path.push(b':'); - new_path.extend_from_slice(my_path.as_bytes()); - command.env("PATH", OsStr::from_bytes(&new_path)); - command.env("PISH_SOCKET", sr.socket_path().as_os_str()); - } + crate::export_fun::prepare_command(self.se.clone(), &mut command); match command.spawn() { Ok(c) => SpawnedCmd::Child(c), |
