PowerShell `vp` wrapper hides failures: `$?` is `True` and `&&` keeps going after `vp` fails
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 72/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- powershell, rust, typescript
- Lĩnh vực
- cli
Hướng nghiên cứu
Bắt đầu bằng cách đọc hàm vp trong env.ps1 và so sánh hành vi trạng thái của nó trong PowerShell với việc chạy trực tiếp vp.exe. Tái hiện lỗi bằng một lệnh khiến vp pack thất bại, sau đó kiểm tra $LASTEXITCODE, $? và một chuỗi &&. Hoàn tất khi wrapper báo lỗi thông qua $? và ngăn chuỗi tiếp tục.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Rust
- Star
- 6k
- Fork
- 274
- Merge trung bình
- 1 ngày 11 giờ
- Pull request đã merge (30 ngày)
- 206
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của voidzero-dev/vite-plus
-
`npx --package=vite-plus vp create` fails with exit 127 when npm is the chosen package managerĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
voidzero-dev/vite-plus#2970 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
pending triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
voidzero-dev/vite-plus#2882 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
voidzero-dev/vite-plus#2097 · 10 bình luận · 2 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Windows: PowerShell installer (1.1.0) does not add vite-plus\bin to user PATH — 'vp' not recognizedĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
voidzero-dev/vite-plus#2984 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
pending triage
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 40/100
voidzero-dev/vite-plus#2983 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của voidzero-dev/vite-plus
Issue tương tự
-
[Bug]: Web chat input doesn't regain focus after a reply finishesCó thể đã có người làm @GaijinSystems đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
zeroclaw-labs/zeroclaw#11658 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
NuSkooler/enigma-bbs#907 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày