PowerShell `vp` wrapper hides failures: `$?` is `True` and `&&` keeps going after `vp` fails
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 72/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- powershell, rust, typescript
- Área
- cli
Línea de trabajo
Empieza leyendo la función vp en env.ps1 y compara su comportamiento de estado en PowerShell con la ejecución directa de vp.exe. Reproduce el fallo con un comando que haga fallar vp pack y luego comprueba $LASTEXITCODE, $? y una cadena &&. El trabajo está completo cuando el wrapper informa del fallo mediante $? e impide que la cadena continúe.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Rust
- Estrellas
- 6k
- Forks
- 274
- Merge medio
- 1 d 11 h
- PR fusionados (30 d)
- 206
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de voidzero-dev/vite-plus
-
`npx --package=vite-plus vp create` fails with exit 127 when npm is the chosen package managerAbiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
voidzero-dev/vite-plus#2970 ·
Los mantenedores suelen responder en 1 día
-
pending triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
voidzero-dev/vite-plus#2882 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
voidzero-dev/vite-plus#2097 · 10 comentarios · 2 reacciones ·
Los mantenedores suelen responder en 1 día
-
Windows: PowerShell installer (1.1.0) does not add vite-plus\bin to user PATH — 'vp' not recognizedAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 30/100
voidzero-dev/vite-plus#2984 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
pending triage
Dificultad 3/5 1-2 días Aptitud para principiantes 40/100
voidzero-dev/vite-plus#2983 ·
Los mantenedores suelen responder en 1 día
Todos los issues de voidzero-dev/vite-plus
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
EasyTier/EasyTier#2672 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
XmlFragment children, successors and siblings stop at the first child that is not an XML typeAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
bug good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
repowise-dev/repowise#3374 ·
Los mantenedores suelen responder en 1 día
-
awaiting-response bug needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
wildcard/caro#1562 · 1 comentario ·
Los mantenedores suelen responder en 3 días