fix: add PNPM_HOME/bin to PATH on all platforms

This commit is contained in:
Zoltan Kochan
2026-03-27 20:16:32 +01:00
parent 8cb9261afe
commit 825c5d3936
2 changed files with 4 additions and 2 deletions

2
dist/index.js vendored

File diff suppressed because one or more lines are too long

View File

@@ -43,9 +43,11 @@ export async function runSelfInstaller(inputs: Inputs): Promise<number> {
addPath(pnpmHome)
exportVariable('PNPM_HOME', pnpmHome)
// pnpm expects PNPM_HOME/bin in PATH for global binaries
addPath(path.join(pnpmHome, 'bin'))
// Ensure pnpm bin link exists — npm ci sometimes doesn't create it
if (process.platform !== 'win32') {
addPath(path.join(pnpmHome, 'bin'))
const pnpmBinLink = path.join(dest, 'node_modules', '.bin', 'pnpm')
if (!existsSync(pnpmBinLink)) {
await mkdir(path.join(dest, 'node_modules', '.bin'), { recursive: true })