Skip to content

Commit a220442

Browse files
committed
Don't skip coloring errors on single-statement execution
1 parent 2a8c729 commit a220442

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Lib/sqlite3/__main__.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@ def main(*args):
113113
Type ".help" for more information; type ".quit" or {eofkey} to quit.
114114
""").strip()
115115

116-
s = get_theme().syntax
116+
theme = get_theme()
117+
s = theme.syntax
117118

118119
sys.ps1 = f"{s.prompt}sqlite> {s.reset}"
119120
sys.ps2 = f"{s.prompt} ... {s.reset}"
@@ -122,7 +123,7 @@ def main(*args):
122123
try:
123124
if args.sql:
124125
# SQL statement provided on the command-line; execute it directly.
125-
execute(con, args.sql, suppress_errors=False)
126+
execute(con, args.sql, suppress_errors=False, theme=theme)
126127
else:
127128
# No SQL provided; start the REPL.
128129
console = SqliteInteractiveConsole(con, use_color=True)

0 commit comments

Comments
 (0)