mirror of
https://github.com/NixOS/nix
synced 2025-07-01 12:37:59 +02:00
nix: Support the --repair flag
This commit is contained in:
parent
89d3cc5a47
commit
17e6b85d05
7 changed files with 28 additions and 17 deletions
|
@ -102,7 +102,6 @@ static int main_nix_instantiate(int argc, char * * argv)
|
|||
bool strict = false;
|
||||
Strings attrPaths;
|
||||
bool wantsReadWrite = false;
|
||||
RepairFlag repair = NoRepair;
|
||||
|
||||
struct MyArgs : LegacyArgs, MixEvalArgs
|
||||
{
|
||||
|
@ -140,8 +139,6 @@ static int main_nix_instantiate(int argc, char * * argv)
|
|||
xmlOutputSourceLocation = false;
|
||||
else if (*arg == "--strict")
|
||||
strict = true;
|
||||
else if (*arg == "--repair")
|
||||
repair = Repair;
|
||||
else if (*arg == "--dry-run")
|
||||
settings.readOnlyMode = true;
|
||||
else if (*arg != "" && arg->at(0) == '-')
|
||||
|
@ -160,7 +157,7 @@ static int main_nix_instantiate(int argc, char * * argv)
|
|||
auto evalStore = myArgs.evalStoreUrl ? openStore(*myArgs.evalStoreUrl) : store;
|
||||
|
||||
auto state = std::make_unique<EvalState>(myArgs.searchPath, evalStore, store);
|
||||
state->repair = repair;
|
||||
state->repair = myArgs.repair;
|
||||
|
||||
Bindings & autoArgs = *myArgs.getAutoArgs(*state);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue