summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rwxr-xr-xbin/home-manager20
1 files changed, 11 insertions, 9 deletions
diff --git a/bin/home-manager b/bin/home-manager
index 5e10bc77..903e2cab 100755
--- a/bin/home-manager
+++ b/bin/home-manager
@@ -112,17 +112,19 @@ function update_link --argument-names new_src target
 end
 
 for np in $NIX_PATH
-    echo $np | read --function --delimiter "=" channel new_src_rel
-    set --local new_src (path resolve $new_src_rel)
+    if string match --quiet --entire "=" $np
+        echo $np | read --function --delimiter "=" channel new_src_rel
+        set --local new_src (path resolve $new_src_rel)
 
-    if test $channel = darwin-config
-        continue
-    end
-    if set --local i (contains --index $channel $old_channels)
-        set --erase old_channels[$i]
-    end
+        if test $channel = darwin-config
+            continue
+        end
+        if set --local i (contains --index $channel $old_channels)
+            set --erase old_channels[$i]
+        end
 
-    update_link $new_src $channel_root/$channel
+        update_link $new_src $channel_root/$channel
+    end
 end
 
 for old in $channel_root/$old_channels