mirror of
https://github.com/NixOS/nix
synced 2025-07-03 06:11:46 +02:00
Set locked flag
This commit is contained in:
parent
04d5417755
commit
f917970df8
3 changed files with 4 additions and 8 deletions
|
@ -682,14 +682,6 @@ LockedFlake lockFlake(
|
|||
flake->lockedRef.input.getRev() &&
|
||||
prevLockedRef.input.getRev() != flake->lockedRef.input.getRev())
|
||||
warn("committed new revision '%s'", flake->lockedRef.input.getRev()->gitRev());
|
||||
|
||||
/* Make sure that we picked up the change,
|
||||
i.e. the tree should usually be dirty
|
||||
now. Corner case: we could have reverted from a
|
||||
dirty to a clean tree! */
|
||||
if (flake->lockedRef.input == prevLockedRef.input
|
||||
&& !flake->lockedRef.input.isLocked())
|
||||
throw Error("'%s' did not change after I updated its 'flake.lock' file; is 'flake.lock' under version control?", flake->originalRef);
|
||||
}
|
||||
} else
|
||||
throw Error("cannot write modified lock file of flake '%s' (use '--no-write-lock-file' to ignore)", topRef);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue