mirror of
https://github.com/NixOS/nix.git
synced 2025-11-09 03:56:01 +01:00
nix-profile{,-daemon}.fish: fix do not source twice
Commitb36637c8f7set `__ETC_PROFILE_NIX_SOURCED` globally, but this is not enough to prevent the script from being run again by child shells, because the variable was not exported and thus not inherited by any child process. Exporting the variable also agrees with the bash scripts. Notably, the old behavior broke `nix develop -c fish` in some cases, because the profile bin directory got prepended to the path, causing binaries from the profile to override binareis from the devshell. (cherry picked from commitb9ed3ae36e)
This commit is contained in:
parent
ab95054e64
commit
1b97d7409a
2 changed files with 2 additions and 2 deletions
|
|
@ -3,7 +3,7 @@ if test -z "$HOME" || test -n "$__ETC_PROFILE_NIX_SOURCED"
|
||||||
exit
|
exit
|
||||||
end
|
end
|
||||||
|
|
||||||
set --global __ETC_PROFILE_NIX_SOURCED 1
|
set --global --export __ETC_PROFILE_NIX_SOURCED 1
|
||||||
|
|
||||||
# Local helpers
|
# Local helpers
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ if test -z "$HOME" || test -n "$__ETC_PROFILE_NIX_SOURCED"
|
||||||
exit
|
exit
|
||||||
end
|
end
|
||||||
|
|
||||||
set --global __ETC_PROFILE_NIX_SOURCED 1
|
set --global --export __ETC_PROFILE_NIX_SOURCED 1
|
||||||
|
|
||||||
# Local helpers
|
# Local helpers
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue