resolve comments

This commit is contained in:
Dibir Magomedsaygitov
2020-09-30 12:34:36 +03:00
parent 94c7463a7f
commit 85b60d074c
7 changed files with 30 additions and 65 deletions

View File

@@ -0,0 +1,22 @@
$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")
$isPathUpdated = $true
}
if (-not $latestPath.Contains($dotnetPath))
{
$latestPath = "$dotnetPath;$latestPath"
Write-Host "Added .dotnet\tools $dotnetPath to PATH"
$isPathUpdated = $true
}
else
{
Write-Host "$dotnetPath already in PATH"
}
$updatedPath = [System.Environment]::GetEnvironmentVariable('PATH', [System.EnvironmentVariableTarget]::Machine)
Write-Host "Windows PATH: $updatedPath"