Skip to content

Commit

Permalink
fix: enable NPM_NO_BIN_LINKS for yarn 1.x.x (#4915)
Browse files Browse the repository at this point in the history
  • Loading branch information
Strangerxxx authored May 14, 2020
1 parent 4a9e5ef commit 873089e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/app-builder-lib/src/util/yarn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,13 @@ function installDependencies(appDir: string, options: RebuildOptions): Promise<a
const npmUserAgent = process.env["npm_config_user_agent"]
const isYarn2 = npmUserAgent != null && npmUserAgent.startsWith("yarn/2.")
if (!isYarn2) {
if (process.env.NPM_NO_BIN_LINKS === "true") {
execArgs.push("--no-bin-links")
}
execArgs.push("--production")
}

if (!isRunningYarn(execPath)) {
if (process.env.NPM_NO_BIN_LINKS === "true") {
execArgs.push("--no-bin-links")
}
execArgs.push("--cache-min", "999999999")
}

Expand Down

0 comments on commit 873089e

Please sign in to comment.