-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nix Installer fails on macOS if /etc/bash.bashrc.backup-before-nix already exists #7215
Comments
They'll have to follow the uninstall instructions before reinstalling it: https://nixos.org/manual/nix/stable/installation/installing-binary.html#macos If they only tried reinstalling because nix wasn't on PATH after taking a macos update, they don't have to reinstall. The update is overwriting the shell hook, but they can just replace it. See #3616 for more. |
This specific case was not directly related to a macos update. It just looked like nix was not installed on that machine (likely it got broken by some macos update in the past) and we tried to run the installer. Running the uninstaller only comes to mind when you're aware that nix is already installed. |
One potential way of fixing this could be check whether the desired lines are already in |
Is your feature request related to a problem? Please describe.
I've seen a couple times that the nix installer fails when a file at
/etc/bash.bashrc.backup-before-nix
already exists. E.g. yesterday a colleague tried to install nix, and as he had nix installed previously at that macbook he got that error saying that the nix installer cannot proceed until we delete the/etc/bash.bashrc.backup-before-nix
file. After that file was deleted, we reran the installer and now got the same error but for thezshrc.backup-before-nix
file.Describe the solution you'd like
The installer should just take care of this automatically. Either ask the user what to do, or even better just automatically rename e.g.
zshrc.backup-before-nix
tozshrc.backup-before-nix2
.The text was updated successfully, but these errors were encountered: