Merge pull request #7920 from cole-h/fix-profile-XDG_STATE_HOME-unbound
nix-profile{,-daemon}.sh.in: Allow XDG_STATE_HOME to be unset
This commit is contained in:
commit
db14e1d4ae
|
@ -3,7 +3,7 @@ if [ -n "${__ETC_PROFILE_NIX_SOURCED:-}" ]; then return; fi
|
|||
__ETC_PROFILE_NIX_SOURCED=1
|
||||
|
||||
NIX_LINK=$HOME/.nix-profile
|
||||
if [ -n "$XDG_STATE_HOME" ]; then
|
||||
if [ -n "${XDG_STATE_HOME-}" ]; then
|
||||
NIX_LINK_NEW="$XDG_STATE_HOME/nix/profile"
|
||||
else
|
||||
NIX_LINK_NEW=$HOME/.local/state/nix/profile
|
||||
|
|
|
@ -3,7 +3,7 @@ if [ -n "$HOME" ] && [ -n "$USER" ]; then
|
|||
# Set up the per-user profile.
|
||||
|
||||
NIX_LINK="$HOME/.nix-profile"
|
||||
if [ -n "$XDG_STATE_HOME" ]; then
|
||||
if [ -n "${XDG_STATE_HOME-}" ]; then
|
||||
NIX_LINK_NEW="$XDG_STATE_HOME/nix/profile"
|
||||
else
|
||||
NIX_LINK_NEW="$HOME/.local/state/nix/profile"
|
||||
|
|
Loading…
Reference in a new issue