about summary refs log tree commit diff
path: root/src/libstore/build.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore/build.cc')
-rw-r--r--src/libstore/build.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index b41daac99159..931b0755bf31 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -1123,8 +1123,10 @@ void DerivationGoal::repairClosure()
 
     /* Get the output closure. */
     PathSet outputClosure;
-    for (auto & i : drv->outputs)
+    for (auto & i : drv->outputs) {
+        if (!wantOutput(i.first, wantedOutputs)) continue;
         computeFSClosure(worker.store, i.second.path, outputClosure);
+    }
 
     /* Filter out our own outputs (which we have already checked). */
     for (auto & i : drv->outputs)