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]