about summary refs log tree commit diff
path: root/src/libmain
diff options
context:
space:
mode:
Diffstat (limited to 'src/libmain')
-rw-r--r--src/libmain/shared.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc
index a832344c9c49..1e48a6365220 100644
--- a/src/libmain/shared.cc
+++ b/src/libmain/shared.cc
@@ -14,6 +14,7 @@ extern "C" {
 
 #include "globals.hh"
 #include "gc.hh"
+#include "store.hh"
 #include "shared.hh"
 
 #include "config.h"
@@ -213,6 +214,8 @@ static void initAndRun(int argc, char * * argv)
     RemoveTempRoots removeTempRoots; /* unused variable - don't remove */
 
     run(remaining);
+
+    closeDB(); /* it's fine if the DB isn't actually open */
 }