fix(nix): skip profile check for Determinate Nix upgrade#2074
Open
Jackenmen wants to merge 1 commit into
Open
Conversation
Member
|
Hi, the solution is almost good, but this still prints the separator when we skip, which we don't want. I think the easiest way to do this is just to duplicate the Thanks for the detailed PR! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do
This PR changes the Nix self-upgrade step to allow upgrading Determinate Nix despite being installed in a profile (which is how it's normally installed). The error message that topgrade prints even says it's about not being able to run the
nix upgrade-nixcommand, which is not something that's run when using Determinate Nix anyway. The code comments confirm this check is specifically meant for avoiding thenix upgrade-nixbug:topgrade/src/steps/os/unix.rs
Lines 691 to 697 in 78dc1b2
Tested on a fresh Ubuntu 26.04 Server VMs that were first set up with the following commands:
As you might note, it was tested with a differently named branch - that branch is a merge of this PR on top of #2072 - without that, the step is skipped due to another bug that #2072 fixes earlier in code.
Before:
After:
Standards checklist
CONTRIBUTING.mdAI involvement
I did not use AI at all