mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-20 06:29:50 +00:00
[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
This commit is contained in:
committed by
GitHub
parent
aa3d80baa9
commit
d261844fc2
@@ -7,8 +7,5 @@ if (-not $latestPath.Contains($dotnetPath))
|
||||
[System.Environment]::SetEnvironmentVariable('PATH', $latestPath, [System.EnvironmentVariableTarget]::Machine)
|
||||
}
|
||||
|
||||
# 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
|
||||
Remove-Item $env:APPDATA\NuGet\NuGet.Config -Force
|
||||
# Recreate the config using the 'dotnet nuget list source command'
|
||||
dotnet nuget list source
|
||||
|
||||
@@ -44,6 +44,9 @@ Describe "Nuget" {
|
||||
It "Nuget" {
|
||||
"nuget" | Should -ReturnZeroExitCode
|
||||
}
|
||||
It "NuGet.Config not exists" {
|
||||
"$env:APPDATA\NuGet\NuGet.Config" | Should -Not -Exist
|
||||
}
|
||||
}
|
||||
|
||||
Describe "OpenSSL" {
|
||||
|
||||
Reference in New Issue
Block a user