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.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nix.cc b/src/nix.cc
index 9bbbf4ae8c85..1012780af844 100644
--- a/src/nix.cc
+++ b/src/nix.cc
@@ -267,8 +267,6 @@ static void opVerify(Strings opFlags, Strings opArgs)
    list. */
 void run(Strings args)
 {
-    openDB();
-
     Strings opFlags, opArgs;
     Operation op = 0;
 
@@ -315,6 +313,8 @@ void run(Strings args)
 
     if (!op) throw UsageError("no operation specified");
 
+    openDB();
+
     op(opFlags, opArgs);
 }