diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-01-30 00:13:37 +0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2020-01-30 00:13:37 +0100 |
commit | b9f93e73869fcbf6e4b2170c824cef7abc465670 (patch) | |
tree | f0a7cc2ba022c035b8c640e60fd9658c184e33d9 /src/libexpr/flake/flake.cc | |
parent | b9fb3720750a24d8b2fbe6b1491696d6a51dcff3 (diff) |
Check LockedInput::computeStorePath()
Diffstat (limited to 'src/libexpr/flake/flake.cc')
-rw-r--r-- | src/libexpr/flake/flake.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libexpr/flake/flake.cc b/src/libexpr/flake/flake.cc index a8f05efb6..21d98089f 100644 --- a/src/libexpr/flake/flake.cc +++ b/src/libexpr/flake/flake.cc @@ -584,6 +584,8 @@ static void prim_callFlake(EvalState & state, const Pos & pos, Value * * args, V throw Error("the content hash of flake '%s' doesn't match the hash recorded in the referring lockfile", lazyInput->lockedInput.ref); + assert(flake.sourceInfo->storePath == lazyInput->lockedInput.computeStorePath(*state.store)); + callFlake(state, flake, lazyInput->lockedInput, v); } else { FlakeCache flakeCache; @@ -593,6 +595,8 @@ static void prim_callFlake(EvalState & state, const Pos & pos, Value * * args, V throw Error("the content hash of repository '%s' doesn't match the hash recorded in the referring lockfile", lazyInput->lockedInput.ref); + assert(sourceInfo.storePath == lazyInput->lockedInput.computeStorePath(*state.store)); + state.mkAttrs(v, 8); assert(state.store->isValidPath(sourceInfo.storePath)); |