From 17e6b85d05b3d32df244b1d4e89aa41fd8bdcae8 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 28 Apr 2023 16:57:37 +0200 Subject: nix: Support the --repair flag --- src/nix-env/nix-env.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/nix-env') diff --git a/src/nix-env/nix-env.cc b/src/nix-env/nix-env.cc index 8b3f903f6..5e94f2d14 100644 --- a/src/nix-env/nix-env.cc +++ b/src/nix-env/nix-env.cc @@ -1391,7 +1391,6 @@ static int main_nix_env(int argc, char * * argv) Operation op = 0; std::string opName; bool showHelp = false; - RepairFlag repair = NoRepair; std::string file; Globals globals; @@ -1489,8 +1488,6 @@ static int main_nix_env(int argc, char * * argv) globals.instSource.systemFilter = getArg(*arg, arg, end); else if (*arg == "--prebuilt-only" || *arg == "-b") globals.prebuiltOnly = true; - else if (*arg == "--repair") - repair = Repair; else if (*arg != "" && arg->at(0) == '-') { opFlags.push_back(*arg); /* FIXME: hacky */ @@ -1515,7 +1512,7 @@ static int main_nix_env(int argc, char * * argv) auto store = openStore(); globals.state = std::shared_ptr(new EvalState(myArgs.searchPath, store)); - globals.state->repair = repair; + globals.state->repair = myArgs.repair; globals.instSource.nixExprPath = std::make_shared( file != "" -- cgit v1.2.3