Skip to content

Commit fe65f7b

Browse files
author
Daniele Briggi
committed
fix(cli): settings command show a message when missing db file
1 parent 3a44b2f commit fe65f7b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/sqlite_rag/cli.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,12 @@ def main(
9696
def show_settings(ctx: typer.Context):
9797
"""Show current settings"""
9898
rag_context = ctx.obj["rag_context"]
99-
rag = rag_context.get_rag(require_existing=True)
99+
try:
100+
rag = rag_context.get_rag(require_existing=True)
101+
except FileNotFoundError:
102+
typer.echo("Database not found. No settings available.")
103+
raise typer.Exit(1)
104+
100105
current_settings = rag.get_settings()
101106

102107
typer.echo("Current settings:")

0 commit comments

Comments
 (0)