mirror of
https://github.com/actions/runner-images.git
synced 2026-01-06 01:59:46 +08:00
12 lines
432 B
PowerShell
12 lines
432 B
PowerShell
$latestPath = [System.Environment]::GetEnvironmentVariable('PATH', [System.EnvironmentVariableTarget]::Machine)
|
|
|
|
$dotnetPath = "$env:USERPROFILE\.dotnet\tools"
|
|
if ($latestPath.Contains("C:\Users\VssAdministrator\.dotnet\tools"))
|
|
{
|
|
$latestPath = $latestPath.Replace("C:\Users\VssAdministrator\.dotnet\tools", "$dotnetPath")
|
|
}
|
|
|
|
if (-not $latestPath.Contains($dotnetPath))
|
|
{
|
|
$latestPath = "$dotnetPath;$latestPath"
|
|
} |