hm-switch: home-manager only returns 0 if help is provided
parent
8b1503c4bd
commit
3a3683baa9
|
@ -24,7 +24,7 @@ rm -rf ~/.local/share/nvim/mason
|
||||||
|
|
||||||
# test if we have home-manager, if not, attempt to use nix to put home-manager to
|
# test if we have home-manager, if not, attempt to use nix to put home-manager to
|
||||||
# our environment
|
# our environment
|
||||||
if [ $(home-manager >/dev/null 2>&1) ]; then
|
if [ $(home-manager help >/dev/null 2>&1) ]; then
|
||||||
nix-shell -p home-manager --run "home-manager switch --flake $HOME_MANAGER_DIR $@"
|
nix-shell -p home-manager --run "home-manager switch --flake $HOME_MANAGER_DIR $@"
|
||||||
else
|
else
|
||||||
home-manager switch -b backup --flake "$HOME_MANAGER_DIR" $@
|
home-manager switch -b backup --flake "$HOME_MANAGER_DIR" $@
|
||||||
|
|
Loading…
Reference in New Issue