summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rwxr-xr-xbin/home-manager8
1 files changed, 6 insertions, 2 deletions
diff --git a/bin/home-manager b/bin/home-manager
index 39ed1639..672c3403 100755
--- a/bin/home-manager
+++ b/bin/home-manager
@@ -30,8 +30,12 @@ for i in 1
         mkdir -p $hm_config_dir
     end
     if test -e $channel_root
-        rm $channel_root/* || exit 1
-        rmdir $channel_root
+        if test ! -L $channel_root
+            rm $channel_root/* || exit 1
+            rmdir $channel_root
+        else
+            rm $channel_root || exit 1
+        end
     end
 end