Skip to content

fix(env): report doctor failures as errors - #3215

Merged
fengmk2 merged 4 commits into
voidzero-dev:mainfrom
liangmiQwQ:fix/env-doctor-errors
Oct 23, 2026
Merged

fengmk2 merged 4 commits into
voidzero-dev:mainfrom
liangmiQwQ:fix/env-doctor-errors

Conversation

@liangmiQwQ

@liangmiQwQ liangmiQwQ commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

vp env doctor reports several failures as warnings or as passed checks, even though the shims fail in the same situations:

  • When the Node.js version fails to resolve, doctor shows a red ✗, but still prints "All checks passed" and exits with 0. The shim exits with 1 and tells the user to run vp env doctor.
  • When the config can't be read, doctor shows a yellow warning under the "Node.js" key. The run already exits with 1 because other checks fail on the same config, but none of them say why.
  • In system-first mode, when node --version fails, doctor shows unknown as the version with a green ✓.
  • When a shim is not found on PATH, the row has no status marker.

This PR reports all four as errors (red ✗), and each one makes doctor exit with 1.

  • The config error has its own "Config" row that names the file: ~/.vite-plus/config.json (could not read). When Node.js resolution fails because it had to read that config, the "Resolution" row shows the same text instead of repeating the parser error.
  • The node version failure matches the package-manager check, which already shows "could not execute".
  • The summary is now ✗ Some issues found. The old "Run the suggested commands to fix them." was misleading for failures that have no command to run. Where a fix command exists, the hint under the failing row already shows it.

Warnings for setups that still work, like a Node.js version that isn't downloaded yet or a missing system Node.js that falls back to managed, stay as they are.

image

🤖 Generated with Claude Code

@liangmiQwQ

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-23T14:55:40.300172Z 7f9def3 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: 7f9def39ef

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@liangmiQwQ
liangmiQwQ marked this pull request as ready for review October 23, 2026 14:56
@liangmiQwQ
liangmiQwQ requested a review from fengmk2 October 23, 2026 14:56
@fengmk2 fengmk2 self-assigned this Oct 23, 2026
@fengmk2
fengmk2 merged commit b90030a into voidzero-dev:main Oct 23, 2026
74 checks passed
@liangmiQwQ
liangmiQwQ deleted the fix/env-doctor-errors branch October 23, 2026 23:12
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