1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 08:31:16 +02:00

nix-env: Support ‘--repair’ flag

This commit is contained in:
Eelco Dolstra 2012-10-03 15:35:42 -04:00
parent 2e90a5a2a7
commit 2bbc4a214e
3 changed files with 9 additions and 5 deletions

View file

@ -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] == '-') {