Files
runner-images-sangeeth/images/win/post-generation/Dotnet.ps1
Aleksandr Chebotov d261844fc2 [Windows] postdotnet: delete nuget.conf if exists (#4013)
* postdotnet: delete nuget.conf if exists

* rename to $nugetConfigPath

* add nuget.config check test

* remove issue link
2021-09-03 14:02:30 +03:00

12 lines
471 B
PowerShell

$latestPath = [System.Environment]::GetEnvironmentVariable('PATH', [System.EnvironmentVariableTarget]::Machine)
$dotnetPath = "$env:USERPROFILE\.dotnet\tools"
if (-not $latestPath.Contains($dotnetPath))
{
$latestPath = "$dotnetPath;$latestPath"
[System.Environment]::SetEnvironmentVariable('PATH', $latestPath, [System.EnvironmentVariableTarget]::Machine)
}
# Recreate the config using the 'dotnet nuget list source command'
dotnet nuget list source