From 1cc1b75d78c7b2cf2e5922ba7afcf072826d232a Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 16 Jun 2017 11:04:16 +0200 Subject: [PATCH] tfs: fix concurrent windows builds --- build/tfs/win32/lib.ps1 | 5 ++++- scripts/env.ps1 | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/build/tfs/win32/lib.ps1 b/build/tfs/win32/lib.ps1 index 610b4d7fcdf..ed8407b7013 100644 --- a/build/tfs/win32/lib.ps1 +++ b/build/tfs/win32/lib.ps1 @@ -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" } diff --git a/scripts/env.ps1 b/scripts/env.ps1 index 3d34630f391..f05a5680644 100644 --- a/scripts/env.ps1 +++ b/scripts/env.ps1 @@ -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 \ No newline at end of file