Files
runner-images/images/win/post-generation/DotnetPath.ps1
Dibir Magomedsaygitov 56633cec4a refactor and rename scripts
2020-09-30 20:13:40 +03:00

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"
}