Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion utils/src/shell_wrapper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ fn real_main() -> anyhow::Result<()> {
let shell = read_link(exe_dir.join("shell")).context("when locating the wrapped shell")?;

// Set the SHELL environment variable to the wrapped shell instead of the wrapper
env::set_var("SHELL", &shell);
let shell_env = env::var_os("SHELL");
if shell_env == Some(exe.into()) {
env::set_var("SHELL", &shell);
}

// Skip if environment was already set
if env::var_os("__NIXOS_SET_ENVIRONMENT_DONE") != Some("1".into()) {
Expand Down
Loading