From 1aaeb30fffe2554d611ee35d5ce9772b5bee0c09 Mon Sep 17 00:00:00 2001 From: develar Date: Thu, 15 Dec 2016 08:22:28 +0100 Subject: [PATCH] fix: yarn detection --- src/yarn.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/yarn.ts b/src/yarn.ts index 8675dd358db..416f84b9699 100644 --- a/src/yarn.ts +++ b/src/yarn.ts @@ -121,6 +121,7 @@ export async function rebuild(appDir: string, electronVersion: string, arch: str log(`Rebuilding native production dependencies for arch ${arch}`) let execPath = process.env.npm_execpath || process.env.NPM_CLI_JS + const isYarn = isYarnPath(execPath) const execArgs: Array = [] if (execPath == null) { execPath = getPackageToolPath() @@ -131,7 +132,7 @@ export async function rebuild(appDir: string, electronVersion: string, arch: str } const env = getGypEnv(electronVersion, arch, buildFromSource) - if (isYarnPath(execPath)) { + if (isYarn) { execArgs.push("run", "install", "--") execArgs.push(...additionalArgs) await BluebirdPromise.each(nativeDeps, it => spawn(execPath, execArgs, {cwd: it, env: env}))