Skip to content

Commit

Permalink
feat: initial yarn support (avoid --cache-min)
Browse files Browse the repository at this point in the history
Closes #861
  • Loading branch information
develar committed Oct 31, 2016
1 parent a3bba92 commit ba1cd4b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/util/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,12 @@ export function getGypEnv(electronVersion: string, arch: string): any {

export function spawnNpmProduction(command: string, appDir: string, forceBuildFromSource: boolean, env?: any): Promise<any> {
let npmExecPath = process.env.npm_execpath || process.env.NPM_CLI_JS
const npmExecArgs = [command, "--production", "--cache-min", "999999999"]
const npmExecArgs = [command, "--production"]

if (npmExecPath == null || !npmExecPath.includes("yarn")) {
npmExecArgs.push("--cache-min", "999999999")
}

if (npmExecPath == null) {
npmExecPath = process.platform === "win32" ? "npm.cmd" : "npm"
}
Expand Down

0 comments on commit ba1cd4b

Please sign in to comment.