mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 00:35:00 +00:00
fix: Handle platform info retrieval errors gracefully
This commit is contained in:
parent
e245d39216
commit
cf496abec0
1 changed files with 7 additions and 1 deletions
|
@ -1030,7 +1030,13 @@ class Coder:
|
|||
return None
|
||||
|
||||
def get_platform_info(self):
|
||||
platform_text = f"- Platform: {platform.platform()}\n"
|
||||
platform_text = ""
|
||||
try:
|
||||
platform_text = f"- Platform: {platform.platform()}\n"
|
||||
except Exception:
|
||||
# Skip platform info if it can't be retrieved
|
||||
pass
|
||||
|
||||
shell_var = "COMSPEC" if os.name == "nt" else "SHELL"
|
||||
shell_val = os.getenv(shell_var)
|
||||
platform_text += f"- Shell: {shell_var}={shell_val}\n"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue