From b3fc38bf6a407f962b83089b2e13cbc90dd53042 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 17 Jul 2003 12:27:55 +0000 Subject: * For debugging: `nix --verify' to check the consistency of the database and store. --- src/nix.cc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/nix.cc') diff --git a/src/nix.cc b/src/nix.cc index fe762798e799..5785cd6b4cc2 100644 --- a/src/nix.cc +++ b/src/nix.cc @@ -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 -- cgit 1.4.1