forked from lix-project/lix
Re-read flake after updating flake.lock
Otherwise we'll evaluate the flake with the wrong metadata (rev, ...).
This commit is contained in:
parent
af35b318f3
commit
86748d3571
|
@ -579,8 +579,13 @@ LockedFlake lockFlake(
|
||||||
|
|
||||||
newLockFile.write(path);
|
newLockFile.write(path);
|
||||||
|
|
||||||
// FIXME: rewriting the lockfile changed the
|
// Rewriting the lockfile changed the top-level
|
||||||
// top-level repo, so we should re-read it.
|
// repo, so we should re-read it.
|
||||||
|
FlakeCache dummyCache;
|
||||||
|
flake = getFlake(state, topRef, {}, lockFlags.useRegistries, dummyCache);
|
||||||
|
|
||||||
|
if (flake.lockedRef.input->isImmutable())
|
||||||
|
throw Error("'%s' did not change after I updated its 'flake.lock' file; is 'flake.lock' under version control?", flake.originalRef);
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
// Hack: Make sure that flake.lock is visible to Git, so it ends up in the Nix store.
|
// Hack: Make sure that flake.lock is visible to Git, so it ends up in the Nix store.
|
||||||
|
|
Loading…
Reference in a new issue