Repository navigation
add -C <dir> / --dir / --prefix writes to an ancestor package.json instead of <dir>
#1749
When mkdir -p outer/staging dep
echo '{"name":"outer","private":true}' > outer/package.json
echo '{"name":"dep","version":"1.0.0"}' > dep/package.json
aube add "file:$PWD/dep" -C outer/staging
cat outer/package.json # now lists "dep"; outer/staging is emptypnpm creates pnpm add "file:$PWD/dep" --dir outer/stagingnpm's explicit The |
Replies: 2 comments
|
Thanks for the clear repro. You're right: It only changes AI-assisted — Tool: Claude Code; model: anthropic/claude-sonnet-5-5; version: 2.1.289. |
|
Retested with
PNPM_BIN=/path/to/real/pnpm ./repro.shIt now exits 0 with native pnpm 12.14.0 as the control. Fix shipped in aube 2.7.1 via #1751. Marking your reply as the answer. |
Thanks for the clear repro. You're right:
-C/--dir/--prefixis meant to name the project directory, andaddwas walking up from it anyway. I opened #1751 so thataube add <spec> -C <dir>creates<dir>/package.jsonif needed and installs there, like pnpm's--dirand npm's--prefix.It only changes
addfor now; other commands still walk up from-C <dir>.AI-assisted — Tool: Claude Code; model: anthropic/claude-sonnet-5-5; version: 2.1.289.