summaryrefslogtreecommitdiffstats
path: root/src/state
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2021-12-31 06:22:01 -0500
committerJesse Luehrs <doy@tozt.net>2021-12-31 06:22:01 -0500
commit0abdc21a320cdde1b385fe0eb73ba5956c9744a7 (patch)
treeb0d6ec7ccf500831a8ef677159358f337124243a /src/state
parent42131f5f9ca126b0b9aeadd1510715bf525cb83f (diff)
downloadnbsh-0abdc21a320cdde1b385fe0eb73ba5956c9744a7.tar.gz
nbsh-0abdc21a320cdde1b385fe0eb73ba5956c9744a7.zip
stop hardcoding /proc stuff
Diffstat (limited to 'src/state')
-rw-r--r--src/state/history/mod.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/state/history/mod.rs b/src/state/history/mod.rs
index 5a38bc0..1912964 100644
--- a/src/state/history/mod.rs
+++ b/src/state/history/mod.rs
@@ -634,7 +634,8 @@ async fn run_pipeline(
let status = if pipeline.exes().len() == 1 {
run_exe(&pipeline.exes()[0], env).await
} else {
- let mut cmd = pty_process::Command::new("/proc/self/exe");
+ let mut cmd =
+ pty_process::Command::new(std::env::current_exe().unwrap());
cmd.arg("--internal-pipe-runner");
let (r, w) =
nix::unistd::pipe2(nix::fcntl::OFlag::O_CLOEXEC).unwrap();