Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

vp run ignores `cd` before a nested `vpr` in a script and runs the parent package's task

Aberta
#3,129 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

@tlq5l já está trabalhando nisso.

Desde 20/10/2026.

  • #867 de @tlq5l — aberto

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
68/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
node.js, rust
Domínio
backend, cli

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

bug
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.

Linguagem predominante
Rust
Estrelas
6.3k
Forks
283
Merge médio
1d 16h
PRs com merge (30d)
214

Preparar o ambiente

Abrir no Codespaces

Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de voidzero-dev/vite-plus

Todas as issues de voidzero-dev/vite-plus

Issues semelhantes

Mais issues de Rust

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.