1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-08 19:46:02 +01:00

Merge pull request #13590 from NixOS/mergify/bp/2.29-maintenance/pr-13244

nix-profile{,-daemon}.fish: fix do not source twice (backport #13244)
This commit is contained in:
mergify[bot] 2025-07-30 19:06:05 +00:00 committed by GitHub
commit 8a3d3b2dce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 8 deletions

View file

@ -1,17 +1,16 @@
# Only execute this file once per shell.
if test -z "$HOME" || \
test -n "$__ETC_PROFILE_NIX_SOURCED"
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
function add_path --argument-names new_path
if type -q fish_add_path
# fish 3.2.0 or newer
fish_add_path --prepend --global $new_path
fish_add_path --prepend --global $new_path
else
# older versions of fish
if not contains $new_path $fish_user_paths

View file

@ -1,17 +1,16 @@
# Only execute this file once per shell.
if test -z "$HOME" || \
test -n "$__ETC_PROFILE_NIX_SOURCED"
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
function add_path --argument-names new_path
if type -q fish_add_path
# fish 3.2.0 or newer
fish_add_path --prepend --global $new_path
fish_add_path --prepend --global $new_path
else
# older versions of fish
if not contains $new_path $fish_user_paths