File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -272,19 +272,25 @@ jobs:
272272 exit 0
273273 }
274274
275- Install-PackageProvider `
276- -Name NuGet `
277- -MinimumVersion 2.8.5.201 `
278- -Force `
279- -Scope CurrentUser
275+ try {
276+ Install-PackageProvider `
277+ -Name NuGet `
278+ -MinimumVersion 2.8.5.201 `
279+ -Force `
280+ -Scope CurrentUser `
281+ -ErrorAction Stop
282+ } catch {
283+ Write-Warning "Could not bootstrap NuGet package provider. Continuing because the runner may already have a usable provider. $($_.Exception.Message)"
284+ }
280285
281286 Install-Module `
282287 -Name TrustedSigning `
283288 -MinimumVersion 0.5.0 `
284289 -Force `
285290 -AllowClobber `
286291 -Repository PSGallery `
287- -Scope CurrentUser
292+ -Scope CurrentUser `
293+ -ErrorAction Stop
288294
289295 Import-Module TrustedSigning -MinimumVersion 0.5.0 -Force
290296 Get-Command Invoke-TrustedSigning -ErrorAction Stop
You can’t perform that action at this time.
0 commit comments