Skip to content

fix(staged): run doctor checks with shell env snapshots - #852

Merged
matt2e merged 2 commits into
mainfrom
installation-env
Jul 3, 2026
Merged

fix(staged): run doctor checks with shell env snapshots#852
matt2e merged 2 commits into
mainfrom
installation-env

Conversation

@matt2e

@matt2e matt2e commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add doctor environment snapshots for binary resolution, checks, freshness probes, and fix execution
  • capture and sanitize Staged home shell env with an extended PATH for doctor subprocesses
  • route Tauri and web doctor entry points through the snapshot-aware APIs

matt2e added 2 commits July 3, 2026 11:28
Signed-off-by: Matt Toohey <contact@matttoohey.com>
Signed-off-by: Matt Toohey <contact@matttoohey.com>
@matt2e
matt2e requested review from baxen and wesbillman as code owners July 3, 2026 04:36

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d0bee2bb2e

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".


if matches!(
upper_key.as_str(),
"NPM_CONFIG_PREFIX" | "NPM_CONFIG_CACHE" | "COREPACK_HOME"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve user npm prefix env

When a user's shell intentionally exports NPM_CONFIG_PREFIX to a user-writable global prefix (for example ~/.npm-global), this sanitizer drops it before run_doctor_fix/run_doctor_update executes npm install -g .... I confirmed npm treats that env var as the global prefix (NPM_CONFIG_PREFIX=/tmp/x npm prefix -g returns /tmp/x), so these doctor fixes/updates will run against npm's default prefix instead, often failing due to permissions or installing a duplicate outside the PATH that doctor just resolved.

Useful? React with 👍 / 👎.

@matt2e
matt2e merged commit e1963c3 into main Jul 3, 2026
6 checks passed
@matt2e
matt2e deleted the installation-env branch July 3, 2026 04:47
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.

1 participant