Skip to content

armgit / cua

Public Imported from GitHub
0

Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.

fix(ci): install the TrustedSigning module with PSResourceGet (#5857)

ddupontb3c003750ec2
diff --git a/.github/workflows/cd-cua-spaces-build.yml b/.github/workflows/cd-cua-spaces-build.yml
index bb03c8886b..d2079df813 100644
--- a/.github/workflows/cd-cua-spaces-build.yml
+++ b/.github/workflows/cd-cua-spaces-build.yml
@@ -600,8 +600,14 @@ jobs:
$ErrorActionPreference = 'Stop'
foreach ($i in 1..4) {
try {
- Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force -Scope CurrentUser | Out-Null
- Install-Module -Name TrustedSigning -Scope CurrentUser -Force -Repository PSGallery
+ # PSResourceGet (in PowerShell 7) needs no NuGet package provider; the
+ # provider bootstrap behind Install-PackageProvider stopped resolving.
+ if (Get-Command Install-PSResource -ErrorAction SilentlyContinue) {
+ Install-PSResource -Name TrustedSigning -Repository PSGallery -TrustRepository -Scope CurrentUser -Reinstall
+ } else {
+ Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force -Scope CurrentUser | Out-Null
+ Install-Module -Name TrustedSigning -Scope CurrentUser -Force -Repository PSGallery
+ }
Import-Module TrustedSigning
Write-Host "TrustedSigning $((Get-Module TrustedSigning).Version) ready"
exit 0
diff --git a/.github/workflows/cd-cua-spaces.yml b/.github/workflows/cd-cua-spaces.yml
index 97d08129c4..96c0832919 100644
--- a/.github/workflows/cd-cua-spaces.yml
+++ b/.github/workflows/cd-cua-spaces.yml
@@ -1536,8 +1536,14 @@ jobs:
$ErrorActionPreference = 'Stop'
foreach ($i in 1..4) {
try {
- Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force -Scope CurrentUser | Out-Null
- Install-Module -Name TrustedSigning -Scope CurrentUser -Force -Repository PSGallery
+ # PSResourceGet (in PowerShell 7) needs no NuGet package provider; the
+ # provider bootstrap behind Install-PackageProvider stopped resolving.
+ if (Get-Command Install-PSResource -ErrorAction SilentlyContinue) {
+ Install-PSResource -Name TrustedSigning -Repository PSGallery -TrustRepository -Scope CurrentUser -Reinstall
+ } else {
+ Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force -Scope CurrentUser | Out-Null
+ Install-Module -Name TrustedSigning -Scope CurrentUser -Force -Repository PSGallery
+ }
Import-Module TrustedSigning
Write-Host "TrustedSigning $((Get-Module TrustedSigning).Version) ready"
exit 0