about summary refs log tree commit diff
path: root/src/nix.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2003-07-17T12·27+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2003-07-17T12·27+0000
commitb3fc38bf6a407f962b83089b2e13cbc90dd53042 (patch)
tree9b5200845516f93a79255dc7857500556c2d0e2a /src/nix.cc
parent71cc3ceae5c5dd97a0faa2dab3da3dd0c479b0b5 (diff)
* For debugging: `nix --verify' to check the consistency of the
  database and store.

Diffstat (limited to 'src/nix.cc')
-rw-r--r--src/nix.cc9
1 files changed, 9 insertions, 0 deletions
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