DATASETTE_INTERNAL, uses click

This commit is contained in:
Alex Garcia 2023-09-07 17:01:03 -07:00
commit 49098b9b2f
2 changed files with 1 additions and 3 deletions

View file

@ -310,9 +310,6 @@ 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())

View file

@ -477,6 +477,7 @@ def uninstall(packages, yes):
"--internal",
type=click.Path(),
help="Path to a persistent Datasette internal SQLite database",
envvar="DATASETTE_INTERNAL"
)
def serve(
files,