From cfe90653acd794902ffe4644f8b1c0212ffad079 Mon Sep 17 00:00:00 2001 From: Alex Garcia Date: Wed, 6 Sep 2023 09:02:50 -0700 Subject: [PATCH] If not --internal flag is passed but $DATASETTE_INTERNAL_DB_PATH is defined, then use that --- datasette/app.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/datasette/app.py b/datasette/app.py index 0227f627..b1630122 100644 --- a/datasette/app.py +++ b/datasette/app.py @@ -310,6 +310,9 @@ class Datasette: Database(self, file, is_mutable=file not in self.immutables) ) + if internal is None and "DATASETTE_INTERNAL_DB_PATH" in os.environ: + internal = os.environ.get("DATASETTE_INTERNAL_DB_PATH") + self.internal_db_created = False if internal is None: self._internal_database = Database(self, memory_name=secrets.token_hex())