[codex] Handle NuGet provider bootstrap failures (#2608)

Co-authored-by: Julius Marminge <[email protected]>
This commit is contained in:
Julius MarmingeandJulius Marminge authored and GitHub committed 2026-05-08 15:20:02 -07:00
1 parent 271d65e047
commit 7bfacd55d8
1 file changed
+12 -6
+12 -6
View File
@@ -272,11 +272,16 @@ jobs:
exit 0
}
Install-PackageProvider `
-Name NuGet `
-MinimumVersion 2.8.5.201 `
-Force `
-Scope CurrentUser
try {
Install-PackageProvider `
-Name NuGet `
-MinimumVersion 2.8.5.201 `
-Force `
-Scope CurrentUser `
-ErrorAction Stop
} catch {
Write-Warning "Could not bootstrap NuGet package provider. Continuing because the runner may already have a usable provider. $($_.Exception.Message)"
}
Install-Module `
-Name TrustedSigning `
@@ -284,7 +289,8 @@ jobs:
-Force `
-AllowClobber `
-Repository PSGallery `
-Scope CurrentUser
-Scope CurrentUser `
-ErrorAction Stop
Import-Module TrustedSigning -MinimumVersion 0.5.0 -Force
Get-Command Invoke-TrustedSigning -ErrorAction Stop