You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
vp run ignores cd before a nested vpr in a script and runs the parent package's task #3129
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
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.
Activity