From d64281d52217770795c31fc4135a121f6844f801 Mon Sep 17 00:00:00 2001 From: John Lindquist Date: Wed, 16 Oct 2024 13:00:46 -0600 Subject: [PATCH] fix(pnpm): set to 9.12.2 --- build.ts | 5 ++++- src/main/install/install-pnpm.ts | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/build.ts b/build.ts index 84371c7af..39294d1d8 100644 --- a/build.ts +++ b/build.ts @@ -229,7 +229,10 @@ try { console.log(`Removing external dependencies: ${uninstallDeps.join(', ')} before @electron/rebuild kicks in`); if (uninstallDeps.length > 0) { for (const dep of uninstallDeps) { - execSync(`pnpm remove ${dep}`, { + + const command = `pnpm remove ${dep}`; + console.log(`Running: ${command}`); + execSync(command, { stdio: 'inherit', }); } diff --git a/src/main/install/install-pnpm.ts b/src/main/install/install-pnpm.ts index a268be724..a5af65116 100644 --- a/src/main/install/install-pnpm.ts +++ b/src/main/install/install-pnpm.ts @@ -85,6 +85,8 @@ function detectArch(): string { return arch } +const PNPM_VERSION = '9.12.2'; + export async function downloadAndInstallPnpm(): Promise { const platform = detectPlatform() const arch = detectArch() @@ -96,7 +98,7 @@ export async function downloadAndInstallPnpm(): Promise { let version: string const preferredVersion = - process.env.PNPM_VERSION || "latest" + process.env?.PNPM_VERSION || PNPM_VERSION if (versionData["dist-tags"][preferredVersion]) { version = versionData["dist-tags"][preferredVersion]