install-darwin-multi-user: relax assumption check

The installer will error out if a user's shell configuration includes any mention of ~nix-profile~, even if this is in a comment. This change is designed to do the bare minimum to ignore lines beginning with a `#`.

(cherry picked from commit 92f9d18aa0)
This commit is contained in:
Anthony Cowley 2017-10-02 20:07:56 -04:00 committed by Eelco Dolstra
parent aa57c32318
commit b03066835c
No known key found for this signature in database
GPG Key ID: 8170B4726D7198DE
1 changed files with 1 additions and 1 deletions

View File

@ -336,7 +336,7 @@ EOF
for file in ~/.bash_profile ~/.bash_login ~/.profile ~/.zshenv ~/.zprofile ~/.zshrc ~/.zlogin; do
if [ -f "$file" ]; then
if grep -l ".nix-profile" "$file"; then
if grep -l "^[^#].*.nix-profile" "$file"; then
failure <<EOF
I found a reference to a ".nix-profile" in $file.
This has a high chance of breaking a new nix installation. It was most