Skip to content

Run install in package-json-file's directory - #27

Open
haines wants to merge 1 commit into
pnpm:mainfrom
haines:run-install-in-correct-directory
Open

Run install in package-json-file's directory#27
haines wants to merge 1 commit into
pnpm:mainfrom
haines:run-install-in-correct-directory

Conversation

@haines

@haines haines commented Aug 10, 2026

Copy link
Copy Markdown

Fixes #17

Summary by CodeRabbit

  • Bug Fixes
    • pnpm install now runs from the directory containing the configured package manifest, improving installation reliability for projects with nonstandard layouts.

@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 2c7b3779-2399-4f1f-b166-d82269594463

📥 Commits

Reviewing files that changed from the base of the PR and between 84cb39b and 0d2ec8e.

⛔ Files ignored due to path filters (1)
  • dist/index.js is excluded by !**/dist/**
📒 Files selected for processing (1)
  • src/pnpm-install/index.ts
📜 Recent review details
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2026-05-11T16:19:49.450Z
Learnt from: zkochan
Repo: pnpm/setup PR: 1
File: src/cache-restore/run.ts:35-35
Timestamp: 2026-05-11T16:19:49.450Z
Learning: When using `actions/exec` (`getExecOutput` / `exec`), it is valid for the `commandLine` option to include both the command and its arguments in a single string (e.g., `getExecOutput('pnpm store path --silent')`). The library tokenizes `commandLine` internally (via `argStringToArray()`), so this behaves like passing an equivalent command + args array (e.g., `getExecOutput('pnpm', ['store','path','--silent'])`). In code reviews, do not flag this as incorrect—this matches documented behavior and a production-tested pattern.

Applied to files:

  • src/pnpm-install/index.ts
🔇 Additional comments (1)
src/pnpm-install/index.ts (1)

37-37: LGTM!


📝 Walkthrough

Walkthrough

runPnpmInstall now runs pnpm install from the directory containing the configured package manifest. Existing error and nonzero-status handling remains unchanged.

Changes

pnpm installation

Layer / File(s) Summary
Use the manifest directory for installation
src/pnpm-install/index.ts
The pnpm install subprocess now uses the manifest’s parent directory as its working directory instead of GITHUB_WORKSPACE.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

  • pnpm/setup#1: Changes the same installation working-directory behavior.
  • pnpm/setup#11: Changes related runPnpmInstall installation arguments.

Suggested reviewers: zkochan

Poem

A rabbit hops where packages grow,
Into the manifest folder below.
pnpm install now starts in the right place,
While errors keep their familiar face.
Monorepo paths can rest easy tonight.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: running installation in the directory that contains package-json-file.
Linked Issues check ✅ Passed The code runs pnpm install from the package manifest directory, which directly satisfies issue #17 for nested package.json files.
Out of Scope Changes check ✅ Passed The one-line change is directly related to the linked issue and introduces no unrelated code changes.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support installing pnpm in another folder rather than fixed in GITHUB_WORKSPACE

1 participant