mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 18:25:00 +00:00
ensure IO obeys pretty flag, catch UnicodeDecodeError on launch and disable pretty
This commit is contained in:
parent
3bf403ba05
commit
4063015560
2 changed files with 40 additions and 15 deletions
|
@ -398,6 +398,16 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
|
|||
editingmode=editing_mode,
|
||||
)
|
||||
|
||||
try:
|
||||
io.tool_output()
|
||||
io.rule()
|
||||
except UnicodeEncodeError as err:
|
||||
if io.pretty:
|
||||
io.pretty = False
|
||||
io.tool_error("Terminal does not support pretty output (UnicodeDecodeError)")
|
||||
else:
|
||||
raise err
|
||||
|
||||
if args.gui and not return_coder:
|
||||
if not check_streamlit_install(io):
|
||||
return
|
||||
|
@ -588,7 +598,6 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
|
|||
if return_coder:
|
||||
return coder
|
||||
|
||||
io.tool_output()
|
||||
coder.show_announcements()
|
||||
|
||||
if args.show_prompts:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue