mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 17:24:59 +00:00
fix: Move if statement out of try block in aider/main.py
This commit is contained in:
parent
8326bd04dd
commit
8e43911a63
1 changed files with 3 additions and 4 deletions
|
@ -507,10 +507,10 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
|
|||
args.max_chat_history_tokens or main_model.max_chat_history_tokens,
|
||||
)
|
||||
|
||||
try:
|
||||
if args.cache_prompts:
|
||||
args.map_refresh = "files"
|
||||
if args.cache_prompts:
|
||||
args.map_refresh = "files"
|
||||
|
||||
try:
|
||||
coder = Coder.create(
|
||||
main_model=main_model,
|
||||
edit_format=args.edit_format,
|
||||
|
@ -538,7 +538,6 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
|
|||
map_refresh=args.map_refresh,
|
||||
cache_prompts=args.cache_prompts,
|
||||
)
|
||||
|
||||
except ValueError as err:
|
||||
io.tool_error(str(err))
|
||||
return 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue