Skip to content

Commit

Permalink
Update Automation-Sdk-Init.ps1
Browse files Browse the repository at this point in the history
  • Loading branch information
fengzhou-msft authored and azure-sdk committed Mar 10, 2022
1 parent e243acd commit 602fa30
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions eng/scripts/Automation-Sdk-Init.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,16 @@ $GlobalJson = Get-Content -Raw -Path (Join-Path $RepoRoot 'global.json') | Conve
$dotnetSdkVersion = $GlobalJson.sdk.version

$installScript = GetDotNetInstallScript

$dotnet = Join-Path $RepoRoot "../dotnetsdk"

if (-not (Test-Path Env:AGENT_TOOLSDIRECTORY))
{
$Env:AGENT_TOOLSDIRECTORY = Join-Path $RepoRoot ".."
}
Write-Host $Env:AGENT_TOOLSDIRECTORY
$dotnet = Join-Path $Env:AGENT_TOOLSDIRECTORY "dotnetsdk"
& bash $installScript --install-dir $dotnet --version $dotnetSdkVersion

$env:PATH = "$dotnet`:" + $env:PATH
$Env:PATH = "$dotnet`:" + $Env:PATH
dotnet --version | Write-Host

if (Test-Path $installScript) {
Expand Down

0 comments on commit 602fa30

Please sign in to comment.