Skip to content

Handle OSError when checking file existence for long paths on macOS#880

Closed
Jah-yee wants to merge 1 commit intomicrosoft:mainfrom
Jah-yee:fix/handle-long-yaml-path-macos
Closed

Handle OSError when checking file existence for long paths on macOS#880
Jah-yee wants to merge 1 commit intomicrosoft:mainfrom
Jah-yee:fix/handle-long-yaml-path-macos

Conversation

@Jah-yee
Copy link
Copy Markdown
Contributor

@Jah-yee Jah-yee commented Apr 23, 2026

Good day

On macOS, PATH_MAX is 1023 bytes, so paths longer than that cause OSError [Errno 63] when checking file existence. This PR wraps the path.is_file() check in a try/except to handle this gracefully.

Thank you for your work on this project. I hope this small fix is helpful. Please let me know if there's anything to adjust.

Warmly, RoomWithRoof

Reference: #848

@danielmeppiel
Copy link
Copy Markdown
Collaborator

@Jah-yee closed as duplicate of #860 as this one came afterwards, but really appreciate your eagerness to contribute!

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.

2 participants