mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Merged PR 19272: Fix DOTNET_ROOT if it is a link
Fix DOTNET_ROOT if it is a link
This commit is contained in:
committed by
Travis Plunk
parent
be8866bccb
commit
21b8c9ebf8
@@ -100,7 +100,10 @@ jobs:
|
||||
|
||||
$toolPath = "$(System.DefaultWorkingDirectory)/toolPath/${{ parameters.globalToolExeName }}"
|
||||
|
||||
$env:DOTNET_ROOT = Split-Path (Get-Command -Type Application -Name dotnet | Select-Object -First 1).Source
|
||||
$source = (get-command -Type Application -Name dotnet | Select-Object -First 1 -ExpandProperty source)
|
||||
$target = (Get-ChildItem $source).target
|
||||
|
||||
$env:DOTNET_ROOT = (resolve-path -Path (Join-Path (split-path $source) $target)).ProviderPath
|
||||
|
||||
Write-Verbose -Verbose "DOTNET_ROOT: $env:DOTNET_ROOT"
|
||||
Get-ChildItem $env:DOTNET_ROOT
|
||||
|
||||
Reference in New Issue
Block a user