1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-16 23:42:43 +01:00

nix: Support the --repair flag

This commit is contained in:
Eelco Dolstra 2023-04-28 16:57:37 +02:00
parent 89d3cc5a47
commit 17e6b85d05
7 changed files with 28 additions and 17 deletions

View file

@ -2,6 +2,7 @@
///@file
#include "args.hh"
#include "repair-flag.hh"
namespace nix {
@ -49,4 +50,21 @@ struct MixJSON : virtual Args
}
};
struct MixRepair : virtual Args
{
RepairFlag repair = NoRepair;
MixRepair()
{
addFlag({
.longName = "repair",
.description =
"During evaluation, rewrite missing or corrupted files in the Nix store. "
"During building, rebuild missing or corrupted store paths.",
.category = miscCategory,
.handler = {&repair, Repair},
});
}
};
}