aboutsummaryrefslogtreecommitdiffstats
path: root/src/run
diff options
context:
space:
mode:
authorJonas Maier <>2026-03-10 15:24:19 +0100
committerJonas Maier <>2026-03-10 15:24:19 +0100
commitc0d6f09ce24d05b9d6cc82bb3394dab0f74a5d57 (patch)
tree73ec2e767377eb875fb4f7889b7c658d14c7bf30 /src/run
parent83e5044fd6e5c2a8bccd29f5a8462e7016823aed (diff)
downloadpish-c0d6f09ce24d05b9d6cc82bb3394dab0f74a5d57.tar.gz
export fun concentrated in its own module
Diffstat (limited to 'src/run')
-rw-r--r--src/run/mod.rs10
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),