Skip to content

Commit

Permalink
install-darwin-multi-user: relax assumption check
Browse files Browse the repository at this point in the history
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 92f9d18)
  • Loading branch information
acowley authored and edolstra committed Oct 12, 2017
1 parent aa57c32 commit b030668
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/install-darwin-multi-user.sh
Expand Up @@ -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
Expand Down

0 comments on commit b030668

Please sign in to comment.