mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-03 03:05:00 +00:00
refactor: improve pip install error handling and messaging
This commit is contained in:
parent
22318a3160
commit
e9e2afe39f
2 changed files with 12 additions and 13 deletions
|
@ -92,17 +92,15 @@ Newer aider version v{latest_version} is available. To upgrade, run:
|
|||
io.tool_error(text)
|
||||
return True
|
||||
|
||||
cmd = utils.get_pip_install(["--upgrade", "aider-chat"])
|
||||
success = utils.check_pip_install_extra(
|
||||
io,
|
||||
None,
|
||||
f"Newer aider version v{latest_version} is available. To upgrade, run:",
|
||||
["--upgrade", "aider-chat"],
|
||||
)
|
||||
|
||||
text = f"Newer aider version v{latest_version} is available. To upgrade, run:"
|
||||
|
||||
io.tool_error(text)
|
||||
if io.confirm_ask("Run pip install?", subject=shlex.join(cmd)):
|
||||
success, output = utils.run_install(cmd)
|
||||
if success:
|
||||
io.tool_output("Re-run aider to use new version.")
|
||||
sys.exit()
|
||||
else:
|
||||
io.tool_error(output)
|
||||
if success:
|
||||
io.tool_output("Re-run aider to use new version.")
|
||||
sys.exit()
|
||||
|
||||
return True
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue