fix(tsconfig): name the OS error when the tsconfig file cannot be read - #899
Open
colinhacks wants to merge 1 commit into
Open
fix(tsconfig): name the OS error when the tsconfig file cannot be read#899colinhacks wants to merge 1 commit into
colinhacks wants to merge 1 commit into
Conversation
A tsconfig the process was not allowed to read produced the same bare "Cannot resolve tsconfig at path: <path>" as a missing one, and the CLI's verdict then told the reader to fix a config that was fine. Seen when a macOS terminal lost TCC access to ~/Documents: every `nub <file>` in a project there failed on the tsconfig line with nothing pointing at the OS. The read diagnostic now carries the io::Error, matching the parse diagnostics on the same path. Unit test covers the unreadable-file case on unix and skips under root, which reads through the mode bits. Claude-Session: https://claude.ai/code/session_01CD2jAnXLg1fVRzyRNAYTBr
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes Checked the complete one-file patch and its effect on the CLI's tsconfig refusal path.
- OS error context —
read_jsoncnow preserves the underlyingstd::io::Errorwhen a discovered tsconfig cannot be read. - Regression coverage — The Unix permissions test distinguishes the old path-only diagnostic from the new cause-bearing message and safely skips privileged runners.
GPT Sol | 𝕏
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

An unreadable tsconfig produced the same line as a missing one, and the verdict under it then told the reader to fix a config that was fine. Seen when a macOS terminal lost TCC access to
~/Documentsfor a few minutes: everynub <file>in a project there stopped on the tsconfig line with nothing pointing at the OS.The read diagnostic now carries the OS error, as the parse diagnostics on the same path already do.
Unit test covers the unreadable file on unix and skips under root, which reads through the mode bits. Follow-up to #778.
https://claude.ai/code/session_01CD2jAnXLg1fVRzyRNAYTBr