mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-08 07:35:01 +03:00
Fix shell environment not loading for Nushell (#7442)
Turns out that Nushell doesn't like `-lic` and `&&`, but works perfectly fine with `-l -i -c` and `;`, which the other shells do too. These all work: bash -l -i -c 'echo lol; /usr/bin/env -0' nu -l -i -c 'echo lol; /usr/bin/env -0' zsh -l -i -c 'echo lol; /usr/bin/env -0' fish -l -i -c 'echo lol; /usr/bin/env -0' Release Notes: - Fixed shell environment not being loaded if Nushell was set as `$SHELL`.
This commit is contained in:
parent
33d982b08a
commit
068c141559
@ -811,7 +811,7 @@ async fn load_login_shell_environment() -> Result<()> {
|
||||
"SHELL environment variable is not assigned so we can't source login environment variables",
|
||||
)?;
|
||||
let output = Command::new(&shell)
|
||||
.args(["-lic", &format!("echo {marker} && /usr/bin/env -0")])
|
||||
.args(["-l", "-i", "-c", &format!("echo {marker}; /usr/bin/env -0")])
|
||||
.output()
|
||||
.await
|
||||
.context("failed to spawn login shell to source login environment variables")?;
|
||||
|
Loading…
Reference in New Issue
Block a user