diff options
author | Alan Pearce | 2024-05-07 11:13:44 +0200 |
---|---|---|
committer | Alan Pearce | 2024-05-18 12:17:12 +0200 |
commit | e204add2f6900d93a1d3ba6536f371c619eae614 (patch) | |
tree | af675feeda1f062298d80b4ea09f6d9b6ae16652 /bin | |
parent | a46864566b13b61bddd9b0ee15457efa288ec3de (diff) | |
download | nixfiles-e204add2f6900d93a1d3ba6536f371c619eae614.tar.lz nixfiles-e204add2f6900d93a1d3ba6536f371c619eae614.tar.zst nixfiles-e204add2f6900d93a1d3ba6536f371c619eae614.zip |
remove channel root more carefully (could be a symlink)
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/home-manager | 8 |
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 |