Fix handling of $NIX_LINK{,_NEW} in nix-profile*.sh
Motivation
In the profile file added for non-NixOS installations of Nix, there is a warning that is to be emitted it two ($NIX_LINK{,_NEW}) profile links exist.
Currently, it would never be printed.
Checklist for maintainers
Maintainers: tick if completed or explain if not relevant
- [ ] agreed on idea
- [ ] agreed on implementation strategy
- [ ] tests, as appropriate
- functional tests -
tests/**.sh - unit tests -
src/*/tests - integration tests -
tests/nixos/*
- functional tests -
- [ ] documentation in the manual
- [ ] documentation in the internal API docs
- [ ] code and comments are self-explanatory
- [ ] commit message explains why the change was made
- [ ] new feature or incompatible change: updated release notes
Priorities
Add :+1: to pull requests you find important.
@cole-h Does this look right to you? (It looks right to me on a quick read, but I'm not terribly familiar with the profile logic and I'm leery of sliding back into the problem that merited #7925.)
@cole-h Does this look right to you? (It looks right to me on a quick read, but I'm not terribly familiar with the profile logic and I'm leery of sliding back into the problem that merited #7925.)
I'm not them, but it looks good to me as well. I don't see a way for this to regress into the issue you linked again.
Any motion on this? Just noticed this issue on my own.