tfs: fix concurrent windows builds

pull/28820/merge
Joao Moreno 2017-06-16 11:04:16 +02:00
parent 735de9f1d7
commit 1cc1b75d78
2 changed files with 5 additions and 2 deletions

View File

@ -1,8 +1,11 @@
# stop when there's an error
$ErrorActionPreference = 'Stop'
# set agent specific npm cache
if (Test-Path env:AGENT_WORKFOLDER) {
# will be used by node-gyp
$env:HOME = "${env:AGENT_WORKFOLDER}\home"
# will be used by npm
$env:npm_config_cache = "${env:AGENT_WORKFOLDER}\npm-cache"
}

View File

@ -1,5 +1,5 @@
$env:npm_config_disturl="https://atom.io/download/electron"
$env:npm_config_target=(node -p "require('./package.json').electronVersion")
$env:npm_config_runtime="electron"
$env:npm_config_cache="$HOME/.npm-electron"
$env:npm_config_cache="${env:USERPROFILE}/.npm-electron"
New-Item -Path "$env:npm_config_cache" -Type directory -Force | out-null