Use unix pipe to capture environment variables (#32136)
The use of `NamedTempFile` in #31799 was not secure and could potentially cause write permission issues (see [this comment](https://github.com/zed-industries/zed/issues/29528#issuecomment-2939672433)). Therefore, it has been replaced with a Unix pipe. Release Notes: - N/A
This commit is contained in:
parent
ee2a329981
commit
3bed830a1f
5 changed files with 87 additions and 29 deletions
|
@ -249,7 +249,7 @@ async fn load_shell_environment(
|
|||
use util::shell_env;
|
||||
|
||||
let dir_ = dir.to_owned();
|
||||
let mut envs = match smol::unblock(move || shell_env::capture(Some(dir_))).await {
|
||||
let mut envs = match smol::unblock(move || shell_env::capture(&dir_)).await {
|
||||
Ok(envs) => envs,
|
||||
Err(err) => {
|
||||
util::log_err(&err);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue