Skip to content

Commit

Permalink
Merge pull request #30 from AArnott/useTemp
Browse files Browse the repository at this point in the history
Use AGENT_TEMPDIRECTORY for tools
  • Loading branch information
AArnott authored Dec 12, 2019
2 parents 5a6c637 + b79e030 commit bec0bf9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 3 additions & 3 deletions azure-pipelines/Get-TempToolsPath.ps1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
if ($env:AGENT_TOOLSDIRECTORY) {
$path = "$env:AGENT_TOOLSDIRECTORY\vs-platform\tools"
if ($env:AGENT_TEMPDIRECTORY) {
$path = "$env:AGENT_TEMPDIRECTORY\$env:BUILD_BUILDID"
} elseif ($env:localappdata) {
$path = "$env:localappdata\vs-platform\tools"
$path = "$env:localappdata\gitrepos\tools"
} else {
$path = "$PSScriptRoot\..\obj\tools"
}
Expand Down
6 changes: 1 addition & 5 deletions azure-pipelines/Get-nbgv.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@ if ($existingTool) {
return $existingTool.Path
}

if ($env:AGENT_TEMPDIRECTORY) {
$toolInstallDir = "$env:AGENT_TEMPDIRECTORY/$env:BUILD_BUILDID"
} else {
$toolInstallDir = "$PSScriptRoot/../obj/tools"
}
$toolInstallDir = & "$PSScriptRoot/Get-TempToolsPath.ps1"

$toolPath = "$toolInstallDir/nbgv"
if (!(Test-Path $toolInstallDir)) { New-Item -Path $toolInstallDir -ItemType Directory | Out-Null }
Expand Down

0 comments on commit bec0bf9

Please sign in to comment.