diff options
author | Jeff Zhao <jeff.no.zhao@gmail.com> | 2023-07-31 16:49:09 -0400 |
---|---|---|
committer | Jeff Zhao <jeff.no.zhao@gmail.com> | 2023-07-31 16:49:09 -0400 |
commit | fd188e962f1e0862a5f83b996fafd7353de58155 (patch) | |
tree | ab5a960abd47a2ccd7922ab724e90f3a3fe2b631 | |
parent | 0cd9c1a88f5491be681b0c871584e9f64b3729b8 (diff) |
set PWD env var when opening programs
-rw-r--r-- | src/util/process.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/util/process.rs b/src/util/process.rs index fba1cff..c7dc0c5 100644 --- a/src/util/process.rs +++ b/src/util/process.rs @@ -23,6 +23,8 @@ where command.stderr(process::Stdio::null()); } + let pwd = std::env::current_dir()?; + command.env("PWD", pwd); command.args(entry.get_args()); command.args(paths); @@ -51,6 +53,8 @@ where command.stderr(process::Stdio::null()); } + let pwd = std::env::current_dir()?; + command.env("PWD", pwd); command.args(entry.get_args()); command.args(paths); |