aboutsummaryrefslogtreecommitdiff
path: root/bpkg/database.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'bpkg/database.cxx')
-rw-r--r--bpkg/database.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/bpkg/database.cxx b/bpkg/database.cxx
index 01488c6..3488fa1 100644
--- a/bpkg/database.cxx
+++ b/bpkg/database.cxx
@@ -11,6 +11,7 @@
#include <odb/sqlite/exceptions.hxx>
#include <bpkg/types>
+#include <bpkg/utility>
#include <bpkg/diagnostics>
using namespace std;
@@ -25,6 +26,9 @@ namespace bpkg
{
path f (d / path ("bpkg.sqlite3"));
+ if (!create && !exists (f))
+ fail << d << " does not look like a bpkg configuration directory";
+
try
{
// We don't need the thread pool.