diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2023-04-28 16:57:37 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2023-04-28 17:03:04 +0200 |
commit | 17e6b85d05b3d32df244b1d4e89aa41fd8bdcae8 (patch) | |
tree | 2c508889b0a4e29671b71bd0474519eb513fac5f /src/nix-build/nix-build.cc | |
parent | 89d3cc5a47a448f624ea4c9b43eeee00dcc88a21 (diff) |
nix: Support the --repair flag
Diffstat (limited to 'src/nix-build/nix-build.cc')
-rw-r--r-- | src/nix-build/nix-build.cc | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/nix-build/nix-build.cc b/src/nix-build/nix-build.cc index 251f00edf..6510df8f0 100644 --- a/src/nix-build/nix-build.cc +++ b/src/nix-build/nix-build.cc @@ -84,7 +84,6 @@ static void main_nix_build(int argc, char * * argv) auto interactive = isatty(STDIN_FILENO) && isatty(STDERR_FILENO); Strings attrPaths; Strings left; - RepairFlag repair = NoRepair; BuildMode buildMode = bmNormal; bool readStdin = false; @@ -169,11 +168,6 @@ static void main_nix_build(int argc, char * * argv) else if (*arg == "--dry-run") dryRun = true; - else if (*arg == "--repair") { - repair = Repair; - buildMode = bmRepair; - } - else if (*arg == "--run-env") // obsolete runEnv = true; @@ -249,7 +243,8 @@ static void main_nix_build(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; + if (myArgs.repair) buildMode = bmRepair; auto autoArgs = myArgs.getAutoArgs(*state); |