Skip to content

Commit 5dd5ba7

Browse files
committed
change init
change init change init change init change init change init change init
1 parent 6a790f0 commit 5dd5ba7

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

eng/scripts/Automation-Sdk-Init.ps1

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ function GetDotNetInstallScript() {
77
New-Item -Path $RepoRoot -Force -ItemType 'Directory' | Out-Null
88
$maxRetries = 5
99
$retries = 1
10-
10+
1111
$uri = "https://dot.net/$dotnetInstallScriptVersion/dotnet-install.sh"
1212
while ($true) {
1313
try {
@@ -37,10 +37,21 @@ $GlobalJson = Get-Content -Raw -Path (Join-Path $RepoRoot 'global.json') | Conve
3737
$dotnetSdkVersion = $GlobalJson.sdk.version
3838

3939
$installScript = GetDotNetInstallScript
40-
40+
4141
$dotnet = Join-Path $RepoRoot "../.dotnet"
4242
& bash $installScript --install-dir $dotnet --version $dotnetSdkVersion
4343

4444
if (Test-Path $installScript) {
4545
Remove-Item $installScript
4646
}
47+
48+
$dotnetRoot = Resolve-Path ($dotnet)
49+
50+
$outputJson = [PSCustomObject]@{
51+
envs = [PSCustomObject]@{
52+
PATH = "$dotnetRoot`:$env:PATH"
53+
DOTNET_ROOT = "$dotnetRoot"
54+
}
55+
}
56+
57+
$outputJson | ConvertTo-Json -depth 100 | Out-File $args[1]

0 commit comments

Comments
 (0)