Skip to content

Commit

Permalink
fix: yarn detection
Browse files Browse the repository at this point in the history
  • Loading branch information
develar committed Dec 15, 2016
1 parent 97f6e0e commit 1aaeb30
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/yarn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string> = []
if (execPath == null) {
execPath = getPackageToolPath()
Expand All @@ -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}))
Expand Down

0 comments on commit 1aaeb30

Please sign in to comment.