nix: Support the --repair flag
This commit is contained in:
@@ -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},
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user