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
No known key found for this signature in database
GPG Key ID: 649E4D4AF74E7DEC
2 changed files with 3 additions and 1 deletions

BIN
dist/index.js vendored

Binary file not shown.

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 })