about summary refs log tree commit diff
path: root/src/nix.cc
diff options
context:
space:
mode:
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