mirror of
https://github.com/NixOS/nix
synced 2025-07-05 12:21:48 +02:00
* For debugging: `nix --verify' to check the consistency of the
database and store.
This commit is contained in:
parent
71cc3ceae5
commit
b3fc38bf6a
7 changed files with 139 additions and 14 deletions
|
@ -283,6 +283,13 @@ static void opInit(Strings opFlags, Strings opArgs)
|
|||
}
|
||||
|
||||
|
||||
/* Verify the consistency of the Nix environment. */
|
||||
static void opVerify(Strings opFlags, Strings opArgs)
|
||||
{
|
||||
verifyStore();
|
||||
}
|
||||
|
||||
|
||||
/* Scan the arguments; find the operation, set global flags, put all
|
||||
other flags in a list, and put all other arguments in another
|
||||
list. */
|
||||
|
@ -316,6 +323,8 @@ void run(Strings args)
|
|||
op = opRestore;
|
||||
else if (arg == "--init")
|
||||
op = opInit;
|
||||
else if (arg == "--verify")
|
||||
op = opVerify;
|
||||
else if (arg[0] == '-')
|
||||
opFlags.push_back(arg);
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue