1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-14 22:42:41 +01:00

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

View file

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