Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン
#3,129 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
68/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
node.js, rust
領域
backend, cli

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Rust
スター
6.3k
フォーク
283
平均マージ
1日 14時間
マージ済み PR(30日)
208

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

voidzero-dev/vite-plus のほかの issue

voidzero-dev/vite-plus の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。