mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-03 19:24:59 +00:00
fix: Handle KeyError in platform info retrieval with clear message
This commit is contained in:
parent
821662abcb
commit
d6906fb100
1 changed files with 3 additions and 3 deletions
|
@ -1033,9 +1033,9 @@ class Coder:
|
|||
platform_text = ""
|
||||
try:
|
||||
platform_text = f"- Platform: {platform.platform()}\n"
|
||||
except Exception:
|
||||
except (Exception, KeyError):
|
||||
# Skip platform info if it can't be retrieved
|
||||
pass
|
||||
platform_text = "- Platform information unavailable\n"
|
||||
|
||||
shell_var = "COMSPEC" if os.name == "nt" else "SHELL"
|
||||
shell_val = os.getenv(shell_var)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue