Skip to content

fix(command): resolve fspy program paths#1868

Closed
leno23 wants to merge 1 commit into
voidzero-dev:mainfrom
leno23:codex/fspy-resolve-program-1599
Closed

fix(command): resolve fspy program paths#1868
leno23 wants to merge 1 commit into
voidzero-dev:mainfrom
leno23:codex/fspy-resolve-program-1599

Conversation

@leno23

@leno23 leno23 commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Make run_command_with_fspy resolve binaries through the same resolve_program path used by run_command.
  • Preserve Windows .cmd/PowerShell prefix handling before spawning through fspy.
  • Update the not-found assertion now that fspy commands fail at Vite+ binary resolution consistently.

Closes #1599

Test Plan

  • git diff --check
  • RUSTUP_TOOLCHAIN=stable rustfmt --edition 2024 --check crates/vite_command/src/lib.rs

Attempted but blocked locally:

  • RUSTUP_TOOLCHAIN=stable cargo test -p vite-command run_command_with_fspy -- --nocapture failed during workspace dependency resolution because this workspace needs nightly -Z bindeps for fspy from vite-task.
  • Repo nightly toolchain (nightly-2026-06-10) is partially installed locally and rustup stalled while downloading the required components.

@netlify

netlify Bot commented Jun 18, 2026

Copy link
Copy Markdown

Deploy Preview for viteplus-preview canceled.

Name Link
🔨 Latest commit a6ffc86
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/6a335c27c95c4b000800841d

@leno23 leno23 marked this pull request as ready for review June 18, 2026 04:57

@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: a6ffc86c52

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

S: AsRef<OsStr>,
{
let cwd = cwd.as_ref();
let (program, prefix_args) = resolve_program(bin_name, envs, cwd)?;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Honor Windows Path overrides before resolving fspy programs

This newly added resolution step only consults envs.get("PATH") through resolve_program, but the create flow builds this fspy environment with prependToPathToEnvs, which preserves the existing path-key casing; on Windows that key is typically Path. When vp create relies on the downloaded package-manager binPrefix, resolving here searches the parent process PATH instead of the just-prepended Path, so it can fail to find pnpm/npx or run a global binary even though the child environment would contain the correct shim. Please resolve the PATH entry case-insensitively or normalize the env map before this call.

Useful? React with 👍 / 👎.

@fengmk2 fengmk2 closed this Jun 18, 2026
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.

Windows: cargo test -p vite_command fspy tests fail when node resolves to Vite+ shim

2 participants