| ... | ... | @@ -272,11 +272,16 @@ jobs: |
| 272 | 272 | exit 0 |
| 273 | 273 | } |
| 274 | 274 | |
| 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 | } |
| 280 | 285 | |
| 281 | 286 | Install-Module ` |
| 282 | 287 | -Name TrustedSigning ` |
| ... | ... | @@ -284,7 +289,8 @@ jobs: |
| 284 | 289 | -Force ` |
| 285 | 290 | -AllowClobber ` |
| 286 | 291 | -Repository PSGallery ` |
| 287 | | -Scope CurrentUser |
| 292 | -Scope CurrentUser ` |
| 293 | -ErrorAction Stop |
| 288 | 294 | |
| 289 | 295 | Import-Module TrustedSigning -MinimumVersion 0.5.0 -Force |
| 290 | 296 | Get-Command Invoke-TrustedSigning -ErrorAction Stop |