mirror of
https://github.com/NixOS/nix
synced 2025-06-24 18:01:16 +02:00
nix-profile{,-daemon}.fish: fix do not source twice
Commit b36637c8f7
set
`__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.
This commit is contained in:
parent
f627b8c721
commit
b9ed3ae36e
2 changed files with 2 additions and 2 deletions
|
@ -3,7 +3,7 @@ if test -z "$HOME" || test -n "$__ETC_PROFILE_NIX_SOURCED"
|
|||
exit
|
||||
end
|
||||
|
||||
set --global __ETC_PROFILE_NIX_SOURCED 1
|
||||
set --global --export __ETC_PROFILE_NIX_SOURCED 1
|
||||
|
||||
# Local helpers
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ if test -z "$HOME" || test -n "$__ETC_PROFILE_NIX_SOURCED"
|
|||
exit
|
||||
end
|
||||
|
||||
set --global __ETC_PROFILE_NIX_SOURCED 1
|
||||
set --global --export __ETC_PROFILE_NIX_SOURCED 1
|
||||
|
||||
# Local helpers
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue