Skip to content

Commit

Permalink
fix: order of platform and arch npm env vars (#1029)
Browse files Browse the repository at this point in the history
  • Loading branch information
lgeiger authored and develar committed Dec 20, 2016
1 parent 9249fcd commit f01a9f7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/yarn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down Expand Up @@ -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),
})
}

Expand Down Expand Up @@ -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<string>, buildFromSource: boolean) {
export async function rebuild(appDir: string, electronVersion: string, platform: string = process.platform, arch: string = process.arch, additionalArgs: Array<string>, buildFromSource: boolean) {
const deps = new Set<string>()
await dependencies(appDir, false, deps)
const nativeDeps = await BluebirdPromise.filter(deps, it => exists(path.join(it, "binding.gyp")), {concurrency: 8})
Expand All @@ -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)
Expand All @@ -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})
}
}
}

0 comments on commit f01a9f7

Please sign in to comment.