Skip to content

Commit

Permalink
fix: yarn automatically grabs proxy config now
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed May 10, 2018
1 parent 91ae363 commit fb3efe4
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/yarn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ export default class Yarn {
`--mutex=file:${path.join(this.cwd, 'yarn.lock')}`,
`--preferred-cache-folder=${cacheDir}`,
'--check-files',
// '--no-lockfile',
...this.proxyArgs(),
]
if (this.config.npmRegistry) {
args.push(`--registry=${this.config.npmRegistry}`)
Expand Down Expand Up @@ -77,13 +75,4 @@ export default class Yarn {
throw err
}
}

proxyArgs(): string[] {
let args = []
let http = process.env.http_proxy || process.env.HTTP_PROXY
let https = process.env.https_proxy || process.env.HTTPS_PROXY
if (http) args.push(`--proxy=${http}`)
if (https) args.push(`--https-proxy=${https}`)
return args
}
}

0 comments on commit fb3efe4

Please sign in to comment.