about summary refs log tree commit diff
path: root/src/nix-store/main.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix-store/main.cc')
-rw-r--r--src/nix-store/main.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nix-store/main.cc b/src/nix-store/main.cc
index 88e6720c020a..0ee7b0a7e955 100644
--- a/src/nix-store/main.cc
+++ b/src/nix-store/main.cc
@@ -686,7 +686,7 @@ void run(Strings args)
     if (!op) throw UsageError("no operation specified");
 
     if (op != opDump && op != opRestore) /* !!! hack */
-        openDB();
+        openDB(op != opGC);
 
     op(opFlags, opArgs);
 }