summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2024-05-22 18:15:54 +0200
committerAlan Pearce2024-05-22 18:15:54 +0200
commit2dd4760ca3e164a2650ec94645a7683148b15022 (patch)
treebd5f2ec2f8923d8bfd558a15be4d10cef8d51e0c
parent34e0a182560bb86e85f3ee45cd9b4296576922de (diff)
downloadnixfiles-2dd4760ca3e164a2650ec94645a7683148b15022.tar.lz
nixfiles-2dd4760ca3e164a2650ec94645a7683148b15022.tar.zst
nixfiles-2dd4760ca3e164a2650ec94645a7683148b15022.zip
bin: fix error when not using direnv
-rwxr-xr-xbin/home-manager3
1 files changed, 1 insertions, 2 deletions
diff --git a/bin/home-manager b/bin/home-manager
index 73d06c7f..cf434738 100755
--- a/bin/home-manager
+++ b/bin/home-manager
@@ -135,8 +135,7 @@ for old in $channel_root/$old_channels
     rm $old
 end
 
-set --function i (contains --index (status dirname) $PATH)
-if test -n $i
+if set --function i (contains --index (status dirname) $PATH) && test -n $i
     set --erase PATH[$i]
 end