mirror of
https://github.com/nix-community/home-manager
synced 2024-11-10 21:29:48 +01:00
home-manager: check profile exists in nixProfileRemove
This commit is contained in:
parent
92a39dcf42
commit
0effaac76b
1 changed files with 3 additions and 1 deletions
|
@ -114,8 +114,10 @@ function nixProfileRemove() {
|
|||
|| -e ${XDG_STATE_HOME:-$HOME/.local/state}/nix/profile/manifest.json ]] ; then
|
||||
nixProfileList "$1" | xargs -t $DRY_RUN_CMD nix profile remove $VERBOSE_ARG
|
||||
else
|
||||
if nix-env -q | grep -q "^$1$"; then
|
||||
$DRY_RUN_CMD nix-env -e "$1" > $DRY_RUN_NULL 2>&1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
function checkUsername() {
|
||||
|
|
Loading…
Reference in a new issue