vp run ignores `cd` before a nested `vpr` in a script and runs the parent package's task
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 68/100
Hướng nghiên cứu
Start by tracing how vp run handles nested vpr commands and resolves their tasks; the issue provides a minimal reproduction with root and ui package scripts. Run the reproduction and compare vpr plain with vpr sub to confirm the working-directory behavior. Done when cd ui && vpr hello inside a script runs the ui package's task.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
If a package.json script does cd <dir> && vpr <task>, vp run ignores the cd. It looks up <task> in the package it started from instead of the one in <dir>. Putting the same command in a subshell, (cd <dir> && vpr <task>), gives the right result.
The log shows vp run running the nested vpr itself rather than handing the whole line to the shell. For plain it prints $ echo ROOT, which is the root's hello.
This happens without any pnpm workspace. The repro has no pnpm-workspace.yaml and no lockfile, so it's a different bug from #3013, though the symptom is the same: vpr in a subfolder runs the root's task.
Reproduction
mkdir repro && cd repro && mkdir ui
echo '{"name":"root","private":true,"scripts":{"hello":"echo ROOT","plain":"cd ui && vpr hello","sub":"(cd ui && vpr hello)"}}' > package.json
echo '{"name":"ui","private":true,"scripts":{"hello":"echo UI"}}' > ui/package.json
vpr plain # prints ROOT, expected UI
vpr sub # prints UI
(cd ui && vpr hello) # from the shell: prints UI
Output:
$ vpr plain
$ echo ROOT ⊘ cache disabled
ROOT
$ vpr sub
$ (cd ui && vpr hello) ⊘ cache disabled
$ echo UI ⊘ cache disabled
UI
Expected
cd ui && vpr hello should run ui's hello, the same as it does in a shell or under npm run. If vp run handles a nested vpr itself, it should apply any earlier cd in the same command before it resolves the task.
Environment
- vp v1.1.0 (global, no local vite-plus)
- Node v24.19.0
- Linux
Written by claude-opus-5-5 via Claude Code in T3 Code on goobles-agentbox.
- Ngôn ngữ chính
- Rust
- Star
- 6.3k
- Fork
- 283
- Merge trung bình
- 1 ngày 14 giờ
- Pull request đã merge (30 ngày)
- 231
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
-
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
-
`pnpm create vite-plus` and `yarn create vite-plus` fail with `spawn vp ENOENT` when `vp` is not on PATHCó thể đã có người làm @fengmk2 đã nhận hôm nay. Đang mởbug
voidzero-dev/vite-plus#3177 · 1 reaction · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
vp migrate doesn't flag esbuild-specific config (minify: "esbuild") — migrated project fails to build on Vite 8Có thể đã có người làm @john-okeefe đã nhận hôm nay. Đang mởcontribution welcome
voidzero-dev/vite-plus#3176 · 1 reaction · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`vp run`: scripts get a non-blocking stdin (EAGAIN) when `run` tasks in vite.config.ts use constantsĐang mởpending triage
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
voidzero-dev/vite-plus#3155 ·
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ự
-
documentation priority:p2 type:chore
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
Maintainer thường phản hồi trong vòng 1 ngày
-
dispatch:sol-high documentation
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 85/100
carrick-sh/carrick#768 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
correctness postgres tursopg
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
tursodatabase/turso#10442 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Incorrect "Share Decks" linkĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
ankitects/anki#5864 · 1 reaction ·
Maintainer thường phản hồi trong vòng 2 ngày
-
area: config effort: S good first issue P3 type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
ferenyl/azuredevopstui#63 ·