From 1abb97cca69e0b513f7499cc7db03ba622b38711 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Tue, 8 Mar 2022 02:37:38 -0500 Subject: use /proc/self/exe directly when re-execing ourself when possible this will use the same binary that is currently running, even if it has been deleted or replaced --- src/shell/history/entry.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/shell/history/entry.rs') diff --git a/src/shell/history/entry.rs b/src/shell/history/entry.rs index 56f378a..145e0cf 100644 --- a/src/shell/history/entry.rs +++ b/src/shell/history/entry.rs @@ -296,7 +296,7 @@ impl Entry { env: &Env, pts: &pty_process::Pts, ) -> Result<(tokio::process::Child, std::fs::File)> { - let mut cmd = pty_process::Command::new(std::env::current_exe()?); + let mut cmd = pty_process::Command::new(crate::info::current_exe()?); cmd.args(&["-c", cmdline, "--status-fd", "3"]); env.apply(&mut cmd); let (from_r, from_w) = -- cgit v1.2.3-54-g00ecf