project: Use login shell to get environment per project (#17717)
This is a follow-up to #17075 to spawn a login shell when getting the environment for projects. The reason why we didn't do it before is that we only used the environment for certain language servers and not a lot of other things, like tasks. But with #17075 we now use the project more often and use it as the _base_ environment for tasks/terminals. Before the change, terminals and tasks would inherit the Zed process' environment, including PATH and so on. After the change, we would set the environment, overwriting the PATH instead of merging. But the non-login shell environment is a subset of the login-shell environment. Release Notes: - Fixed environment variables used per project in terminals/tasks overwriting the base environment and not making use of a login-shell environment.
This commit is contained in:
parent
b5c42edf1e
commit
9407d86ce6
1 changed files with 1 additions and 1 deletions
|
@ -219,7 +219,7 @@ async fn load_shell_environment(
|
|||
);
|
||||
|
||||
let output = smol::process::Command::new(&shell)
|
||||
.args(["-i", "-c", &command])
|
||||
.args(["-l", "-i", "-c", &command])
|
||||
.envs(direnv_environment)
|
||||
.output()
|
||||
.await
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue