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)
A user had an install, uninstalled it via the instructions, and found their nix broken.
The issue was based around nix-daemon already running.
I tried to be very smart around searching their launchctl files:
$ grep -ri nix-daemon ~/Library/LaunchAgents /Library/LaunchAgents /Library/LaunchDaemons /System/Library/LaunchAgents /System/Library/LaunchDaemons
but then couldn't figure out how to write out (nicely) commands for uninstalling
or unloading them based on their name, and also couching the instrunctions in a
bit of doubt so we don't piss off some poor mac admin because their users just
deleted some important launchd files.