diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-10-03T19·35-0400 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-10-03T19·35-0400 |
commit | 2bbc4a214ee998816921cefb2d69f30d5f277d12 (patch) | |
tree | c0df3ee463f1797c011a4852c6fa7f8322ff3297 /src/libstore/build.cc | |
parent | 2e90a5a2a7646f4ab36202d6a149518ccb6f750e (diff) |
nix-env: Support ‘--repair’ flag
Diffstat (limited to 'src/libstore/build.cc')
-rw-r--r-- | src/libstore/build.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc index b62991dff0f3..d05ff75064fe 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()) { |