2020-09-29 18:13:37 +03:00
|
|
|
|
$latestPath = [System.Environment]::GetEnvironmentVariable('PATH', [System.EnvironmentVariableTarget]::Machine)
|
|
|
|
|
|
$dotnetPath = "$env:USERPROFILE\.dotnet\tools"
|
|
|
|
|
|
|
|
|
|
|
|
if (-not $latestPath.Contains($dotnetPath))
|
|
|
|
|
|
{
|
|
|
|
|
|
$latestPath = "$dotnetPath;$latestPath"
|
2020-10-01 12:43:21 +03:00
|
|
|
|
[System.Environment]::SetEnvironmentVariable('PATH', $latestPath, [System.EnvironmentVariableTarget]::Machine)
|
2021-04-09 19:07:59 +03:00
|
|
|
|
}
|
|
|
|
|
|
|
2021-05-13 21:12:54 +03:00
|
|
|
|
# Delete empty nuget.config file created by choco and recreate the config using the 'dotnet nuget list source command'
|
|
|
|
|
|
# before choco or powershell’s ancient embedded nuget does to prevent the issue with downloading packages from nuget.org
|
|
|
|
|
|
# https://github.com/actions/virtual-environments/issues/3038
|
2021-04-09 19:07:59 +03:00
|
|
|
|
Remove-Item $env:APPDATA\NuGet\NuGet.Config -Force
|
2021-05-13 21:12:54 +03:00
|
|
|
|
dotnet nuget list source
|