mirror of
https://github.com/NixOS/nix
synced 2025-06-28 17:51:15 +02:00
nix-env: Support ‘--repair’ flag
This commit is contained in:
parent
2e90a5a2a7
commit
2bbc4a214e
3 changed files with 9 additions and 5 deletions
|
@ -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()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue