diff --git a/packages/api/core/src/api/start.ts b/packages/api/core/src/api/start.ts index c7dfef77ad..967eaf2765 100644 --- a/packages/api/core/src/api/start.ts +++ b/packages/api/core/src/api/start.ts @@ -44,15 +44,18 @@ export default async ({ throw new Error(`Please set your application's 'version' in '${dir}/package.json'.`); } + const platform = process.env.npm_config_platform || process.platform; + const arch = process.env.npm_config_arch || process.arch; + await rebuild( dir, await getElectronVersion(dir, packageJSON), - process.platform as ForgePlatform, - process.arch as ForgeArch, + platform as ForgePlatform, + arch as ForgeArch, forgeConfig.electronRebuildConfig, ); - await runHook(forgeConfig, 'generateAssets', process.platform, process.arch); + await runHook(forgeConfig, 'generateAssets', platform, arch); let lastSpawned: ElectronProcess | null = null;