1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-03 06:11:46 +02:00

Set locked flag

This commit is contained in:
Eelco Dolstra 2022-06-01 13:16:23 +02:00
parent 04d5417755
commit f917970df8
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
3 changed files with 4 additions and 8 deletions

View file

@ -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);