Skip to content

Don't crash on startup when version cache dir is unwritable#5452

Open
ikatyal2110 wants to merge 2 commits into
Aider-AI:mainfrom
ikatyal2110:fix-versioncheck-permission-error
Open

Don't crash on startup when version cache dir is unwritable#5452
ikatyal2110 wants to merge 2 commits into
Aider-AI:mainfrom
ikatyal2110:fix-versioncheck-permission-error

Conversation

@ikatyal2110

Copy link
Copy Markdown

When aider starts in an environment where Path.home() resolves to an unwritable path (e.g. / in certain containers or WSL configs), the mkdir and touch calls in the finally block of check_version() raise PermissionError, crashing startup before the user can do anything. The fix wraps those two lines in a try/except OSError so a bad home directory silently skips the cache write instead of aborting. Fixes #2865.

@CLAassistant

CLAassistant commented Jul 13, 2026

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ ikatyal2110
❌ ikatyal21
You have signed the CLA already but the status is still pending? Let us recheck it.

@ikatyal2110
ikatyal2110 force-pushed the fix-versioncheck-permission-error branch from 2e1d899 to ace460f Compare July 13, 2026 22:31
@goransh-buh

Copy link
Copy Markdown

Nice, straightforward implementation.

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 1175

4 participants