From a5b3fe7621b8d5157f9189d08ad1584ac39664a2 Mon Sep 17 00:00:00 2001 From: Lukas Geiger Date: Tue, 20 Dec 2016 01:16:24 +0100 Subject: [PATCH] fix: order of platform and arch npm env vars fixes https://github.com/electron-userland/electron-builder/issues/1027#issuecomment-268066701 --- src/yarn.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/yarn.ts b/src/yarn.ts index 94b7a674356..0bc5aa04aaf 100644 --- a/src/yarn.ts +++ b/src/yarn.ts @@ -12,7 +12,7 @@ export async function installOrRebuild(options: BuildMetadata, appDir: string, e await installDependencies(appDir, electronVersion, platform, arch, args, !options.npmSkipBuildFromSource) } else { - await rebuild(appDir, electronVersion, arch, platform, args, !options.npmSkipBuildFromSource) + await rebuild(appDir, electronVersion, platform, arch, args, !options.npmSkipBuildFromSource) } } @@ -55,7 +55,7 @@ function installDependencies(appDir: string, electronVersion: string, platform: execArgs.push(...additionalArgs) return spawn(execPath, execArgs, { cwd: appDir, - env: getGypEnv(electronVersion, arch, platform, buildFromSource), + env: getGypEnv(electronVersion, platform, arch, buildFromSource), }) } @@ -110,7 +110,7 @@ function isYarnPath(execPath: string | null) { return execPath != null && path.basename(execPath).startsWith("yarn") } -export async function rebuild(appDir: string, electronVersion: string, arch: string = process.arch, platform: string = process.platform, additionalArgs: Array, buildFromSource: boolean) { +export async function rebuild(appDir: string, electronVersion: string, platform: string = process.platform, arch: string = process.arch, additionalArgs: Array, buildFromSource: boolean) { const deps = new Set() await dependencies(appDir, false, deps) const nativeDeps = await BluebirdPromise.filter(deps, it => exists(path.join(it, "binding.gyp")), {concurrency: 8}) @@ -133,7 +133,7 @@ export async function rebuild(appDir: string, electronVersion: string, arch: str execPath = process.env.npm_node_execpath || process.env.NODE_EXE || "node" } - const env = getGypEnv(electronVersion, arch, platform, buildFromSource) + const env = getGypEnv(electronVersion, platform, arch, buildFromSource) if (isYarn) { execArgs.push("run", "install", "--") execArgs.push(...additionalArgs) @@ -145,4 +145,4 @@ export async function rebuild(appDir: string, electronVersion: string, arch: str execArgs.push(...nativeDeps.map(it => path.basename(it))) await spawn(execPath, execArgs, {cwd: appDir, env: env}) } -} \ No newline at end of file +}