From 49b8837b499e6724aef4dd18a87b60937cc9d2dc Mon Sep 17 00:00:00 2001 From: Zoltan Kochan Date: Mon, 16 Mar 2026 02:15:16 +0100 Subject: [PATCH] fix: run bootstrap pnpm via node instead of bin shim Use `node .../pnpm/bin/pnpm.cjs` to run the bootstrap pnpm, matching the approach used by the old bundled pnpm.cjs. This avoids issues with the .bin symlink on different platforms. Co-Authored-By: Claude Opus 4.6 --- dist/index.js | Bin 1425220 -> 1425251 bytes src/install-pnpm/run.ts | 6 +++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/index.js b/dist/index.js index 4908eea76ef7a34e9c4bdafdd1b9400be318c142..4a6f1302e451abd169c0018faa90c7ec8d759e0f 100644 GIT binary patch delta 132 zcmX@|FYNKZu!a`K7N!>F7M2#)7Pc1l7LFFq7OocV7M>Q~7QPn#7J(MQ7NHj57LhHY z57&wo9~RqREU*IkwYd){B}6l-fo+>L_LA6_+IDA~iW6u_R;r`t_ny`2jm}FJAxv delta 101 zcmV-r0Gj{f{#L~PR)B;7gaU*Egam{Iga(8Mgb0KQgbIWUgbaiYgbsucgb;)ggc5`k zgcP(D;jIfUVrgz7EFy4jaBa8ttrcSd4Rt+RB57`ObYX04A}p6%uN5|zqOTPk0YSIU HuN9RKPX8os diff --git a/src/install-pnpm/run.ts b/src/install-pnpm/run.ts index 5d97954..f87bcb6 100644 --- a/src/install-pnpm/run.ts +++ b/src/install-pnpm/run.ts @@ -27,7 +27,7 @@ export async function runSelfInstaller(inputs: Inputs): Promise { return npmExitCode } - const bootstrapPnpm = path.join(bootstrapDir, 'node_modules', '.bin', 'pnpm') + const bootstrapPnpm = path.join(bootstrapDir, 'node_modules', 'pnpm', 'bin', 'pnpm.cjs') // Step 2: Use bootstrap pnpm to install the target version (verified via project's pnpm-lock.yaml) await rm(dest, { recursive: true, force: true }) @@ -47,8 +47,8 @@ export async function runSelfInstaller(inputs: Inputs): Promise { // prepare target pnpm const target = await readTarget({ version, packageJsonFile, standalone }) - const installArgs = ['install', target, '--no-lockfile'] - const exitCode = await runCommand(bootstrapPnpm, installArgs, { cwd: dest }) + const installArgs = [bootstrapPnpm, 'install', target, '--no-lockfile'] + const exitCode = await runCommand(process.execPath, installArgs, { cwd: dest }) if (exitCode === 0) { const pnpmHome = path.join(dest, 'node_modules/.bin') addPath(pnpmHome)