aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libstore/build.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index 95280ef1e..20d3c7387 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -4421,6 +4421,9 @@ void SubstitutionGoal::tryNext()
subPath = sub->makeFixedOutputPathFromCA(storePath.name(), *ca);
if (sub->storeDir == worker.store.storeDir)
assert(subPath == storePath);
+ } else if (sub->storeDir != worker.store.storeDir) {
+ tryNext();
+ return;
}
try {