Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

PowerShell `vp` wrapper hides failures: `$?` is `True` and `&&` keeps going after `vp` fails

Chiusa Adatta ai principianti
#2,934 2 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@fengmk2 ci sta già lavorando.

Dal 8/10/2026.

  • #2947 di @fengmk2 — integrata

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
72/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
powershell, rust, typescript
Ambito
cli

Direzione di ricerca

Inizia leggendo la funzione vp in env.ps1 e confronta il suo comportamento sullo stato in PowerShell con l’esecuzione diretta di vp.exe. Riproduci il malfunzionamento con un comando che faccia fallire vp pack, poi controlla $LASTEXITCODE, $? e una catena &&. Il lavoro è completato quando il wrapper segnala il fallimento tramite $? e impedisce alla catena di proseguire.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug pending triage
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
Lingua principale
Rust
Stelle
6k
Fork
274
Merge medio
1g 11h
PR unite (30g)
206

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di voidzero-dev/vite-plus

Tutte le issue di voidzero-dev/vite-plus

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.