PowerShell `vp` wrapper hides failures: `$?` is `True` and `&&` keeps going after `vp` fails
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- powershell, rust, typescript
- Domain
- cli
Research direction
Start by reading the vp function in env.ps1 and compare its PowerShell status behavior with running vp.exe directly. Reproduce the failure with a command that makes vp pack fail, then check $LASTEXITCODE, $?, and an && chain. Done when the wrapper reports failure through $? and prevents the chain from continuing.
Written by the indexing model from the issue text.
Description
Describe the bug
In PowerShell, the vp function defined in env.ps1 loses the exit status of the vp.exe binary. When a command fails, $LASTEXITCODE is set correctly, but $? is True.
Reproduction
see below
Steps to reproduce
example vite.config.ts:
export default defineConfig({
pack: {
entry: 'src/does-not-exist.js'
},
});
In powershell:
> vp pack
VITE+ - The Unified Toolchain for the Web
ℹ entry: src/does-not-exist.js
...
error: Build failed with 1 error:
[UNRESOLVED_ENTRY] Cannot resolve entry module src/fail.js.
at ...
> "$LastExitCode $?"
1 True
vp pack returns with exit code 1 (good), and with status True (bad).
running vp.exe directly does not have this issue:
> vp.exe pack
VITE+ - The Unified Toolchain for the Web
ℹ entry: src/does-not-exist.js
...
error: Build failed with 1 error:
[UNRESOLVED_ENTRY] Cannot resolve entry module src/fail.js.
at ...
> "$LastExitCode $?"
1 False
with vp.exe, $? correctly outputs False, which correctly breaks && chains for example
System Info
> vp env current
VITE+ - The Unified Toolchain for the Web
Node.js:
Version 26.11.0
Source devEngines.runtime
Bin Path C:\Users\me\AppData\Local\vite-plus\data\js_runtime\node\26.11.0\node.exe
Installed true
Mode managed
Package Manager:
Name npm
Version 12.2.0
Source devEngines.packageManager
Bin Paths
npm C:\Users\me\AppData\Local\vite-plus\data\package_manager\npm\12.2.0\npm\bin\npm.cmd
npx C:\Users\me\AppData\Local\vite-plus\data\package_manager\npm\12.2.0\npm\bin\npx.cmd
Installed true
Mode managed
> vp --version
VITE+ - The Unified Toolchain for the Web
vp v1.1.0
Local vite-plus:
vite-plus v1.1.0
Tools:
vite v8.3.3
rolldown v1.2.12
vitest v5.0.3
oxfmt v0.72.0
oxlint v1.87.0
oxlint-tsgolint v7.0.2003
tsdown v0.23.0
Environment:
Package manager npm ^12.2.0
Node.js v26.11.0 (devEngines.runtime)
Used Package Manager
npm
Logs
Validations
- Read the Contributing Guidelines.
- Check that there isn't already an issue for the same bug.
- Confirm this is a Vite+ issue and not an upstream issue (Vite, Vitest, tsdown, Rolldown, or Oxc).
- The provided reproduction is a minimal reproducible example.
- Dominant language
- Rust
- Stars
- 6k
- Forks
- 274
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 206
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from voidzero-dev/vite-plus
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
voidzero-dev/vite-plus#2970 ·
Maintainers usually reply within 1 day
-
pending triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
voidzero-dev/vite-plus#2882 · 2 comments ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
voidzero-dev/vite-plus#2097 · 10 comments · 2 reactions ·
Maintainers usually reply within 1 day
-
Windows: PowerShell installer (1.1.0) does not add vite-plus\bin to user PATH — 'vp' not recognizedOpen
Difficulty 4/5 3-5 days Newbie friendliness 30/100
voidzero-dev/vite-plus#2984 · 1 comment ·
Maintainers usually reply within 1 day
-
pending triage
Difficulty 3/5 1-2 days Newbie friendliness 40/100
voidzero-dev/vite-plus#2983 ·
Maintainers usually reply within 1 day
All issues in voidzero-dev/vite-plus
Similar issues
-
C-bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
rust-lang/rust-analyzer#23501 ·
Maintainers usually reply within 1 day
-
bug P2 ready for work T-security T-transport
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
modelcontextprotocol/rust-sdk#1339 ·
Maintainers usually reply within 3 days
-
French BIP39 wordlist starts with a UTF-8 BOM, so generated French mnemonics carry U+FEFF and derive a non-canonical seedPossibly taken @Kshot3000 claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 91/100
ergoplatform/sigma-rust#976 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
[Bug]: Web chat input doesn't regain focus after a reply finishesPossibly taken @GaijinSystems claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
zeroclaw-labs/zeroclaw#11658 ·
Maintainers usually reply within 2 days