mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 00:08:07 +02:00
Check for the existence of a profile target before seeing if it mentions Nix
Grep would ignore files that didn't exist, but would complain about files in a directory if the directory didn't exist. Simply check for the directory first, prior to grepping it.
This commit is contained in:
parent
2921165a9d
commit
4ba91f5bae
1 changed files with 1 additions and 1 deletions
|
@ -369,7 +369,7 @@ and try again.
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if grep -qi "nix" "$profile_target"; then
|
if [ -e "$profile_target" ] && grep -qi "nix" "$profile_target"; then
|
||||||
failure <<EOF
|
failure <<EOF
|
||||||
It looks like $profile_target already has some Nix configuration in
|
It looks like $profile_target already has some Nix configuration in
|
||||||
there. There should be no reason to run this again. If you're having
|
there. There should be no reason to run this again. If you're having
|
||||||
|
|
Loading…
Reference in a new issue