Skip to content

Commit 99a821c

Browse files
committed
python CLI: improve error message if sqlite3 shell isn't installed
1 parent 74e08b7 commit 99a821c

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

bindings/python/genomicsqlite/__init__.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,15 @@ def _cli():
239239
)
240240
sys.exit(1)
241241

242+
import shutil
243+
244+
if not shutil.which("sqlite3"):
245+
print(
246+
"Error: the `sqlite3` command-line shell doesn't seem to be available; ensure it's installed and found in $PATH",
247+
file=sys.stderr,
248+
)
249+
sys.exit(1)
250+
242251
cfg = {}
243252
try:
244253
sys.argv[sys.argv.index("--readonly")] = "-readonly"

0 commit comments

Comments
 (0)