diff --git a/src/libstore/build.cc b/src/libstore/build.cc index c1cbf362a0..b37193b858 100644 --- a/src/libstore/build.cc +++ b/src/libstore/build.cc @@ -2639,7 +2639,7 @@ void SubstitutionGoal::referencesValid() if (nrFailed > 0) { debug(format("some references of path `%1%' could not be realised") % storePath); - amDone(ecFailed); + amDone(nrNoSubstituters > 0 ? ecNoSubstituters : ecFailed); return; }