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:
parent
89d3cc5a47
commit
17e6b85d05
7 changed files with 28 additions and 17 deletions
|
|
@ -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},
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue