aboutsummaryrefslogtreecommitdiff
path: root/src/nix-env
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2023-04-28 16:57:37 +0200
committerEelco Dolstra <edolstra@gmail.com>2023-04-28 17:03:04 +0200
commit17e6b85d05b3d32df244b1d4e89aa41fd8bdcae8 (patch)
tree2c508889b0a4e29671b71bd0474519eb513fac5f /src/nix-env
parent89d3cc5a47a448f624ea4c9b43eeee00dcc88a21 (diff)
nix: Support the --repair flag
Diffstat (limited to 'src/nix-env')
-rw-r--r--src/nix-env/nix-env.cc5
1 files changed, 1 insertions, 4 deletions
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<EvalState>(new EvalState(myArgs.searchPath, store));
- globals.state->repair = repair;
+ globals.state->repair = myArgs.repair;
globals.instSource.nixExprPath = std::make_shared<SourcePath>(
file != ""