aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2023-03-01 23:01:42 +0100
committerGitHub <noreply@github.com>2023-03-01 23:01:42 +0100
commitffadc35df121cf2c90f0e7095291ef1f42e410ee (patch)
treeae73a7c0672d5956700fe9eaf19629044db9db8f /scripts
parent182129d985344ea1a952de3a2cb9846237fc9ad4 (diff)
parent990fbb8fefd4c2f229e4153b0be5fa5ca8dd175e (diff)
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
Diffstat (limited to 'scripts')
-rw-r--r--scripts/nix-profile-daemon.sh.in2
-rw-r--r--scripts/nix-profile.sh.in2
2 files changed, 2 insertions, 2 deletions
diff --git a/scripts/nix-profile-daemon.sh.in b/scripts/nix-profile-daemon.sh.in
index 80774f1f2..8cfd3149e 100644
--- a/scripts/nix-profile-daemon.sh.in
+++ b/scripts/nix-profile-daemon.sh.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
diff --git a/scripts/nix-profile.sh.in b/scripts/nix-profile.sh.in
index e8af91211..c4d60cf37 100644
--- a/scripts/nix-profile.sh.in
+++ b/scripts/nix-profile.sh.in
@@ -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