mirror of
https://github.com/nix-community/home-manager.git
synced 2025-12-24 18:00:58 +01:00
home-manager: avoid running empty nix profile remove
We only want to run `nix profile remove` if there is actually anything to remove.
This commit is contained in:
parent
4256729006
commit
190c6f4609
2 changed files with 2 additions and 2 deletions
|
|
@ -112,7 +112,7 @@ function nixProfileRemove() {
|
|||
# nix-darwin and won't require uninstalling `home-manager-path`.
|
||||
if [[ -e $HOME/.nix-profile/manifest.json \
|
||||
|| -e ${XDG_STATE_HOME:-$HOME/.local/state}/nix/profile/manifest.json ]] ; then
|
||||
nixProfileList "$1" | xargs -t $DRY_RUN_CMD nix profile remove $VERBOSE_ARG
|
||||
nixProfileList "$1" | xargs -rt $DRY_RUN_CMD nix profile remove $VERBOSE_ARG
|
||||
else
|
||||
if nix-env -q | grep -q "^$1$"; then
|
||||
run --silence nix-env -e "$1"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue