Merge pull request #7925 from cole-h/fixup-xdg-nix-env
Check if NIX_LINK_NEW exists instead of checking that NIX_LINK doesn't exist
This commit is contained in:
@@ -8,7 +8,7 @@ if [ -n "${XDG_STATE_HOME-}" ]; then
|
||||
else
|
||||
NIX_LINK_NEW=$HOME/.local/state/nix/profile
|
||||
fi
|
||||
if ! [ -e "$NIX_LINK" ]; then
|
||||
if [ -e "$NIX_LINK_NEW" ]; then
|
||||
NIX_LINK="$NIX_LINK_NEW"
|
||||
else
|
||||
if [ -t 2 ] && [ -e "$NIX_LINK_NEW" ]; then
|
||||
|
||||
@@ -8,7 +8,7 @@ if [ -n "$HOME" ] && [ -n "$USER" ]; then
|
||||
else
|
||||
NIX_LINK_NEW="$HOME/.local/state/nix/profile"
|
||||
fi
|
||||
if ! [ -e "$NIX_LINK" ]; then
|
||||
if [ -e "$NIX_LINK_NEW" ]; then
|
||||
NIX_LINK="$NIX_LINK_NEW"
|
||||
else
|
||||
if [ -t 2 ] && [ -e "$NIX_LINK_NEW" ]; then
|
||||
|
||||
Reference in New Issue
Block a user