Skip to content

Handle inaccessible OAuth keys file when loading dotenv files - #5633

Open
Longado wants to merge 1 commit into
Aider-AI:mainfrom
Longado:codex/fix-oauth-env-permission-error
Open

Handle inaccessible OAuth keys file when loading dotenv files#5633
Longado wants to merge 1 commit into
Aider-AI:mainfrom
Longado:codex/fix-oauth-env-permission-error

Conversation

@Longado

@Longado Longado commented Aug 26, 2026

Copy link
Copy Markdown

Summary

  • catch OSError while probing the optional ~/.aider/oauth-keys.env file
  • continue loading other dotenv files when that OAuth file is inaccessible
  • add a regression test that raises PermissionError for the OAuth path and verifies the git-root .env still loads

Tests

  • pytest -q tests/basic/test_main.py (77 passed)
  • uvx pre-commit run --files aider/main.py tests/basic/test_main.py

Fixes #5462

@CLAassistant

CLAassistant commented Aug 26, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Uncaught PermissionError in pathlib.py line 840

2 participants