aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/build.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-10-03 15:35:42 -0400
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-10-03 15:35:42 -0400
commit2bbc4a214ee998816921cefb2d69f30d5f277d12 (patch)
treec0df3ee463f1797c011a4852c6fa7f8322ff3297 /src/libstore/build.cc
parent2e90a5a2a7646f4ab36202d6a149518ccb6f750e (diff)
nix-env: Support ‘--repair’ flag
Diffstat (limited to 'src/libstore/build.cc')
-rw-r--r--src/libstore/build.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index b62991dff..d05ff7506 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -1105,8 +1105,10 @@ void DerivationGoal::repairClosure()
if (worker.store.pathContentsGood(*i)) continue;
printMsg(lvlError, format("found corrupted or missing path `%1%' in the output closure of `%2%'") % *i % drvPath);
Path drvPath2 = outputsToDrv[*i];
- if (drvPath2 == "") throw Error(format("don't know how to repair corrupted or missing path `%1%'") % *i);
- addWaitee(worker.makeDerivationGoal(drvPath2, true));
+ if (drvPath2 == "")
+ addWaitee(worker.makeSubstitutionGoal(*i, true));
+ else
+ addWaitee(worker.makeDerivationGoal(drvPath2, true));
}
if (waitees.empty()) {