Skip to content

Commit

Permalink
Move Set-EnvVars.ps1 to tools
Browse files Browse the repository at this point in the history
  • Loading branch information
AArnott committed Aug 19, 2020
1 parent 9469bdf commit 5439be7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion init.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ try {
}
}

& "$PSScriptRoot\azure-pipelines\Set-EnvVars.ps1" -Variables $EnvVars | Out-Null
& "$PSScriptRoot/tools/Set-EnvVars.ps1" -Variables $EnvVars | Out-Null
}
catch {
Write-Error $error[0]
Expand Down
2 changes: 1 addition & 1 deletion tools/Install-DotNetSdk.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -165,5 +165,5 @@ $runtimeVersions | Get-Unique |% {
}

if ($PSCmdlet.ShouldProcess("Set DOTNET environment variables to discover these installed runtimes?")) {
& "$PSScriptRoot/../azure-pipelines/Set-EnvVars.ps1" -Variables $envVars -PrependPath $DotNetInstallDir | Out-Null
& "$PSScriptRoot/Set-EnvVars.ps1" -Variables $envVars -PrependPath $DotNetInstallDir | Out-Null
}
8 changes: 5 additions & 3 deletions tools/Install-NuGetCredProvider.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ Param (
[string]$AccessToken
)

$envVars = @{}

$toolsPath = & "$PSScriptRoot\..\azure-pipelines\Get-TempToolsPath.ps1"

if ($IsMacOS -or $IsLinux) {
Expand Down Expand Up @@ -66,9 +68,9 @@ if ($AccessToken) {
Add-Member -InputObject $auth -MemberType NoteProperty -Name endpointCredentials -Value $endpoints

$authJson = ConvertTo-Json -InputObject $auth
$envVars = @{
$envVars += @{
'VSS_NUGET_EXTERNAL_FEED_ENDPOINTS'=$authJson;
}

& "$PSScriptRoot\..\azure-pipelines\Set-EnvVars.ps1" -Variables $envVars | Out-Null
}

& "$PSScriptRoot/Set-EnvVars.ps1" -Variables $envVars | Out-Null
File renamed without changes.

0 comments on commit 5439be7

Please sign in to comment.