aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/build.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore/build.cc')
-rw-r--r--src/libstore/build.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index 1de50a140..026721f3b 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -472,6 +472,12 @@ void DerivationGoal::outputsSubstituted()
{
trace("all outputs substituted (maybe)");
+ if (nrFailed > 0 && !tryFallback) {
+ throw Error(format("some substitutes for the outputs of derivation `%1%' failed; try `--fallback'") % drvPath);
+ }
+
+ nrFailed = 0;
+
if (checkPathValidity(false).size() == 0) {
amDone(true);
return;