refactor: replace --disturl option with NODEJS_ORG_MIRROR env variable

for better compatibility with pnpm 4 (which does not allow the
`--disturl` option)
This commit is contained in:
Haoqun Jiang
2019-10-16 13:18:14 +08:00
parent badf63d7f0
commit 5d2c8da754
@@ -126,7 +126,8 @@ class PackageManager {
args.push(`--registry=${registry}`)
if (registry === registries.taobao) {
args.push(`--disturl=${TAOBAO_DIST_URL}`)
// for node-gyp
process.env.NODEJS_ORG_MIRROR = TAOBAO_DIST_URL
}
return args