From 29336fae2c6a53ce3a959bc2e4864e1034dda7ec Mon Sep 17 00:00:00 2001 From: Feng Zhou <55177366+fengzhou-msft@users.noreply.github.com> Date: Thu, 13 Jan 2022 10:46:26 +0800 Subject: [PATCH] Update Automation-Sdk-Generate.ps1 --- eng/scripts/Automation-Sdk-Generate.ps1 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/eng/scripts/Automation-Sdk-Generate.ps1 b/eng/scripts/Automation-Sdk-Generate.ps1 index 9b82e3fe8383..b04a2b8d8a71 100644 --- a/eng/scripts/Automation-Sdk-Generate.ps1 +++ b/eng/scripts/Automation-Sdk-Generate.ps1 @@ -55,7 +55,12 @@ foreach ($path in $autorestFilesPath) { Write-Host "Updated autorest.md files for all the changed swaggers. `n" $packages = @() -$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" Write-Host "List dotnet directory" ls $dotnet | Write-Host $env:PATH = "$dotnet`:" + $env:PATH