mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 08:16:15 +02:00
nix profile upgrade: Always upgrade unlocked flakerefs
The "lockedRef" field is a misnomer, since it can be unlocked (e.g. for a dirty Git workdir). In that case, `nix profile upgrade` needs to assume that the package can have changed, and perform an upgrade.
This commit is contained in:
parent
eaa6c26189
commit
2306e96767
1 changed files with 3 additions and 1 deletions
|
@ -648,7 +648,9 @@ struct CmdProfileUpgrade : virtual SourceExprCommand, MixDefaultProfile, MixProf
|
|||
assert(infop);
|
||||
auto & info = *infop;
|
||||
|
||||
if (element.source->lockedRef == info.flake.lockedRef) continue;
|
||||
if (info.flake.lockedRef.input.isLocked()
|
||||
&& element.source->lockedRef == info.flake.lockedRef)
|
||||
continue;
|
||||
|
||||
printInfo("upgrading '%s' from flake '%s' to '%s'",
|
||||
element.source->attrPath, element.source->lockedRef, info.flake.lockedRef);
|
||||
|
|
Loading…
Reference in a new issue