GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Windows: `cargo test -p vite_command` fspy tests fail when `node` resolves to Vite+ shim · Issue #1599 · voidzero-dev/vite-plus

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

New issue
Copy link
New issue
Copy link
Open
Open
Windows: cargo test -p vite_command fspy tests fail when node resolves to Vite+ shim#1599
Copy link
Assignees
fengmk2
Labels
bugSomething isn't working
Milestone
RC

Description

@fengmk2
fengmk2
opened on May 16, 2026
Issue body actions

Summary

On Windows, cargo test -p vite_command can fail in the run_command_with_fspy tests when node resolves through the Vite+ trampoline shim in ~/.vite-plus/bin/node.exe.

The failing tests call run_command_with_fspy("node", ...). Unlike run_command, the fspy path does not resolve the binary through resolve_program, so PATH resolution happens inside fspy::Command. In an environment where Vite+ managed shims are earlier on PATH, node resolves to the trampoline shim, which dispatches to ~/.vite-plus/current/bin/vp.exe. Under fspy, the trampoline fails to spawn vp.exe, causing the child status to be nonzero.

Reproduction

On Windows with Vite+ shims on PATH:

cargo test -p vite_command

Observed failures:

vite-plus: failed to execute C:\Users\fengmk2\.vite-plus\current\bin\vp.exe

failures:
    tests::run_command_with_fspy_tests::test_run_command_with_fspy
    tests::run_command_with_fspy_tests::test_run_command_with_fspy_and_capture_path_accesses_write_file
    tests::run_command_with_fspy_tests::test_run_command_with_fspy_and_capture_path_accesses_write_and_read_file

The failed assertions are assert!(cmd_result.status.success()) in crates/vite_command/src/lib.rs.

Notes

C:\Users\fengmk2\.vite-plus\current\bin\vp.exe --version works outside fspy, so this appears specific to the fspy-wrapped child process plus Vite+ trampoline resolution.

The likely issue is that run_command_with_fspy is environment-sensitive on Windows because it passes the bare binary name directly to fspy:

let mut cmd = fspy::Command::new(bin_name);

while run_command first resolves the program via resolve_program, including Windows shim handling.

Possible fix directions

  • Make run_command_with_fspy resolve the binary consistently with run_command before spawning.
  • In tests, avoid depending on ambient PATH by resolving a real Node executable explicitly or by filtering Vite+ shim paths out of PATH.
  • Investigate why the trampoline cannot spawn vp.exe under fspy and whether that path should be supported directly.

Activity

  1. fengmk2
    self-assigned this
    on May 16, 2026
  2. fengmk2
    added
    bugSomething isn't working
    on May 16, 2026
  3. fengmk2
    added this to the Beta milestone on May 21, 2026
  4. fengmk2
    modified the milestones: Beta, RC on Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @fengmk2
    fengmk2

Labels

bugSomething isn't working

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    • RC

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.