diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-10-03T19·35-0400 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-10-03T19·35-0400 |
commit | 2bbc4a214ee998816921cefb2d69f30d5f277d12 (patch) | |
tree | c0df3ee463f1797c011a4852c6fa7f8322ff3297 /src/nix-env/nix-env.cc | |
parent | 2e90a5a2a7646f4ab36202d6a149518ccb6f750e (diff) |
nix-env: Support ‘--repair’ flag
Diffstat (limited to 'src/nix-env/nix-env.cc')
-rw-r--r-- | src/nix-env/nix-env.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nix-env/nix-env.cc b/src/nix-env/nix-env.cc index dd2fa30481f7..d9b48e81c9fd 100644 --- a/src/nix-env/nix-env.cc +++ b/src/nix-env/nix-env.cc @@ -702,7 +702,7 @@ static void opSet(Globals & globals, PathSet paths = singleton<PathSet>(drv.queryDrvPath(globals.state)); printMissing(*store, paths); if (globals.dryRun) return; - store->buildPaths(paths); + store->buildPaths(paths, globals.state.repair); } else { printMissing(*store, singleton<PathSet>(drv.queryOutPath(globals.state))); @@ -1317,6 +1317,8 @@ void run(Strings args) globals.instSource.systemFilter = needArg(i, args, arg); else if (arg == "--prebuilt-only" || arg == "-b") globals.prebuiltOnly = true; + else if (arg == "--repair") + globals.state.repair = true; else { remaining.push_back(arg); if (arg[0] == '-') { |