Skip to content
Merged
Prev Previous commit
Next Next commit
Don't skip coloring errors on single-statement execution
  • Loading branch information
ambv committed May 6, 2025
commit a220442e7ed52a38c0a45f97ce61057e2b6946c7
5 changes: 3 additions & 2 deletions Lib/sqlite3/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ def main(*args):
Type ".help" for more information; type ".quit" or {eofkey} to quit.
""").strip()

s = get_theme().syntax
theme = get_theme()
s = theme.syntax

sys.ps1 = f"{s.prompt}sqlite> {s.reset}"
sys.ps2 = f"{s.prompt} ... {s.reset}"
Expand All @@ -122,7 +123,7 @@ def main(*args):
try:
if args.sql:
# SQL statement provided on the command-line; execute it directly.
execute(con, args.sql, suppress_errors=False)
execute(con, args.sql, suppress_errors=False, theme=theme)
else:
# No SQL provided; start the REPL.
console = SqliteInteractiveConsole(con, use_color=True)
Expand Down
Loading