Skip to content

fix(install): use managed npm for global commands#1442

Open
lyzno1 wants to merge 8 commits intovoidzero-dev:mainfrom
lyzno1:codex/managed-npm-global-commands
Open

fix(install): use managed npm for global commands#1442
lyzno1 wants to merge 8 commits intovoidzero-dev:mainfrom
lyzno1:codex/managed-npm-global-commands

Conversation

@lyzno1
Copy link
Copy Markdown
Contributor

@lyzno1 lyzno1 commented Apr 22, 2026

Summary

  • Use the resolved managed npm binary for global add/remove/update/outdated commands when the adjacent npm is executable.
  • Fall back to npm on PATH when the adjacent managed npm is missing or not executable, with debug logging for diagnostics.
  • Keep existing vite_install APIs compatible by falling back to npm when no explicit binary is provided.
  • Add coverage for absolute binary resolution and managed npm fallback behavior.

Why

Global npm commands previously depended on PATH being prepared by the caller. This makes the managed npm path explicit when it is safe to do so, while preserving PATH-based fallback for system runtimes and unchanged command arguments.

Tests

  • cargo test -p vite_command --no-fail-fast
  • cargo test -p vite_install --no-fail-fast
  • cargo test -p vite_global_cli --no-fail-fast

@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 22, 2026

Deploy Preview for viteplus-preview canceled.

Name Link
🔨 Latest commit c3514aa
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/69e8f0110a128d0008fd6fb1

@lyzno1 lyzno1 force-pushed the codex/managed-npm-global-commands branch from 39c38fb to d6af7bc Compare April 22, 2026 14:42
@lyzno1 lyzno1 force-pushed the codex/managed-npm-global-commands branch from d6af7bc to 6c66bcc Compare April 22, 2026 14:42
@lyzno1
Copy link
Copy Markdown
Contributor Author

lyzno1 commented Apr 22, 2026

@codex review

Copy link
Copy Markdown

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

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: 6c66bccd71

ℹ️ 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".

Comment thread crates/vite_command/src/lib.rs Outdated
@lyzno1
Copy link
Copy Markdown
Contributor Author

lyzno1 commented Apr 22, 2026

@codex review

Copy link
Copy Markdown

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

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: 3e9603627f

ℹ️ 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".

Comment thread crates/vite_global_cli/src/commands/mod.rs Outdated
@lyzno1 lyzno1 marked this pull request as ready for review April 22, 2026 15:59
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