1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-24 22:11:15 +02:00

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:
Eelco Dolstra 2023-03-01 23:01:42 +01:00 committed by GitHub
commit ffadc35df1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 2 deletions

View file

@ -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

View file

@ -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