aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/misc.cc
diff options
context:
space:
mode:
authorGuillaume Maudoux <guillaume.maudoux@tweag.io>2022-09-07 00:34:03 +0200
committerGuillaume Maudoux <guillaume.maudoux@tweag.io>2022-09-07 00:34:03 +0200
commiteb460a9529dd79995b6b788d59322fbc8f989214 (patch)
tree2dec54ef6b3096d787cb49cb0f2f6b7041b1f6c1 /src/libstore/misc.cc
parent9ff892aad4ee13532ea84cb6e4a2a53d70945efe (diff)
parent96001098796c9011d1670cc8a7acd00ef49b2d7a (diff)
WIP: broken merge but need a git checkpoint
Diffstat (limited to 'src/libstore/misc.cc')
-rw-r--r--src/libstore/misc.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/libstore/misc.cc b/src/libstore/misc.cc
index 2bbd7aa70..fb985c97b 100644
--- a/src/libstore/misc.cc
+++ b/src/libstore/misc.cc
@@ -278,11 +278,16 @@ std::map<DrvOutput, StorePath> drvOutputReferences(
std::set<Realisation> inputRealisations;
for (const auto & [inputDrv, outputNames] : drv.inputDrvs) {
- auto outputHashes =
+ const auto outputHashes =
staticOutputHashes(store, store.readDerivation(inputDrv));
for (const auto & outputName : outputNames) {
+ auto outputHash = get(outputHashes, outputName);
+ if (!outputHash)
+ throw Error(
+ "output '%s' of derivation '%s' isn't realised", outputName,
+ store.printStorePath(inputDrv));
auto thisRealisation = store.queryRealisation(
- DrvOutput{outputHashes.at(outputName), outputName});
+ DrvOutput{*outputHash, outputName});
if (!thisRealisation)
throw Error(
"output '%s' of derivation '%s' isn't built", outputName,