Skip to content

Commit 825c5d3

Browse files
committed
fix: add PNPM_HOME/bin to PATH on all platforms
1 parent 8cb9261 commit 825c5d3

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/install-pnpm/run.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,11 @@ export async function runSelfInstaller(inputs: Inputs): Promise<number> {
4343
addPath(pnpmHome)
4444
exportVariable('PNPM_HOME', pnpmHome)
4545

46+
// pnpm expects PNPM_HOME/bin in PATH for global binaries
47+
addPath(path.join(pnpmHome, 'bin'))
48+
4649
// Ensure pnpm bin link exists — npm ci sometimes doesn't create it
4750
if (process.platform !== 'win32') {
48-
addPath(path.join(pnpmHome, 'bin'))
4951
const pnpmBinLink = path.join(dest, 'node_modules', '.bin', 'pnpm')
5052
if (!existsSync(pnpmBinLink)) {
5153
await mkdir(path.join(dest, 'node_modules', '.bin'), { recursive: true })

0 commit comments

Comments
 (0)