Skip to content

Commit f0c972a

Browse files
committed
Addresses #12: Auto-quiet on output redirection
1 parent 9a04174 commit f0c972a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/pytgpt/console.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1167,7 +1167,9 @@ def timeout_handler(signum, frame):
11671167
clear_history_file(filepath, new)
11681168
prompt = Optimizers.code(prompt) if code else prompt
11691169
prompt = Optimizers.shell_command(prompt) if shell else prompt
1170-
busy_bar.spin_index = 0 if quiet else busy_bar_index
1170+
busy_bar.spin_index = (
1171+
0 if any([quiet, sys.stdout.isatty() == False]) else busy_bar_index
1172+
)
11711173
bot.code_theme = code_theme
11721174
bot.color = font_color
11731175
bot.prettify = prettify

0 commit comments

Comments
 (0)