Skip to content

Don't crash on /read-only when a pattern can't be globbed#5346

Open
ikatyal2110 wants to merge 1 commit into
Aider-AI:mainfrom
ikatyal2110:fix-read-only-glob-crash
Open

Don't crash on /read-only when a pattern can't be globbed#5346
ikatyal2110 wants to merge 1 commit into
Aider-AI:mainfrom
ikatyal2110:fix-read-only-glob-crash

Conversation

@ikatyal2110

Copy link
Copy Markdown

On Windows, /read-only with a drive-relative pattern crashes aider entirely — Path.glob() raises NotImplementedError ('Non-relative patterns are unsupported') and it wasn't caught. Wrapped the glob calls in cmd_read_only so a pattern that can't be globbed is reported as an error instead of taking down the whole app. Added a test. Fixes #5311

Path.glob() raises NotImplementedError for non-relative patterns (e.g. a
Windows drive-relative path), which propagated out of cmd_read_only and
crashed aider entirely. Wrap the glob calls and report the bad pattern
instead of letting it take down the app.

Fixes Aider-AI#5311
@CLAassistant

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 sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@ikatyal2110 ikatyal2110 marked this pull request as ready for review June 29, 2026 03:16
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 NotImplementedError in pathlib.py line 949

3 participants