aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorregnat <rg@regnat.ovh>2021-01-05 10:01:22 +0100
committerregnat <rg@regnat.ovh>2021-01-26 14:49:23 +0100
commitd3c428413367a87ab2d27abe9c7f3c379eb12e1c (patch)
treea4db271ebaec766e74e9e1dc8d54c2a7d3ad05ee
parent00eef5599374608f535bed0daede024c5e24764f (diff)
Make the error message for missing outputs more useful
Don't only show the name of the output, but also the derivation to which this output belongs (as otherwise it's very hard to track back what went wrong)
-rw-r--r--src/libstore/store-api.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstore/store-api.cc b/src/libstore/store-api.cc
index 01e2fcc7b..9da415c42 100644
--- a/src/libstore/store-api.cc
+++ b/src/libstore/store-api.cc
@@ -394,7 +394,7 @@ OutputPathMap Store::queryDerivationOutputMap(const StorePath & path) {
OutputPathMap result;
for (auto & [outName, optOutPath] : resp) {
if (!optOutPath)
- throw Error("output '%s' has no store path mapped to it", outName);
+ throw Error("output '%s' of derivation '%s' has no store path mapped to it", outName, printStorePath(path));
result.insert_or_assign(outName, *optOutPath);
}
return result;