File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ function GetDotNetInstallScript() {
7
7
New-Item - Path $RepoRoot - Force - ItemType ' Directory' | Out-Null
8
8
$maxRetries = 5
9
9
$retries = 1
10
-
10
+
11
11
$uri = " https://dot.net/$dotnetInstallScriptVersion /dotnet-install.sh"
12
12
while ($true ) {
13
13
try {
@@ -37,10 +37,21 @@ $GlobalJson = Get-Content -Raw -Path (Join-Path $RepoRoot 'global.json') | Conve
37
37
$dotnetSdkVersion = $GlobalJson.sdk.version
38
38
39
39
$installScript = GetDotNetInstallScript
40
-
40
+
41
41
$dotnet = Join-Path $RepoRoot " ../.dotnet"
42
42
& bash $installScript -- install-dir $dotnet -- version $dotnetSdkVersion
43
43
44
44
if (Test-Path $installScript ) {
45
45
Remove-Item $installScript
46
46
}
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 ]
You can’t perform that action at this time.
0 commit comments