mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 10:14:59 +00:00
fix: use IO encoding and handle decode errors in cmd_load
This commit is contained in:
parent
2af48e159c
commit
b111fc357c
1 changed files with 1 additions and 2 deletions
|
@ -1252,9 +1252,8 @@ class Commands:
|
|||
self.io.tool_error("Please provide a filename containing commands to load.")
|
||||
return
|
||||
|
||||
#ai use io.encoding, ignore decode errs!
|
||||
try:
|
||||
with open(args.strip(), "r") as f:
|
||||
with open(args.strip(), "r", encoding=self.io.encoding, errors="replace") as f:
|
||||
commands = f.readlines()
|
||||
except FileNotFoundError:
|
||||
self.io.tool_error(f"File not found: {args}")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue