Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

Harden Windows Pester install against missing PSGallery (#6892)

Daniel Han53a071cb1414
diff --git a/.github/workflows/studio-windows-inference-smoke.yml b/.github/workflows/studio-windows-inference-smoke.yml
index 8186c072118..0bc216d65a9 100644
--- a/.github/workflows/studio-windows-inference-smoke.yml
+++ b/.github/workflows/studio-windows-inference-smoke.yml
@@ -1610,6 +1610,13 @@ jobs:
- name: Install Pester v5
shell: pwsh
run: |
+ # PSGallery is intermittently absent from the repository list on GitHub's Windows
+ # runners, which makes `Set-PSRepository PSGallery` fail with "No repository with the
+ # name 'PSGallery' was found." Re-register the default gallery first so the policy
+ # change and module install below always have a repository to target.
+ if (-not (Get-PSRepository -Name PSGallery -ErrorAction SilentlyContinue)) {
+ Register-PSRepository -Default -ErrorAction SilentlyContinue
+ }
Set-PSRepository PSGallery -InstallationPolicy Trusted
Install-Module Pester -MinimumVersion 5.5.0 -Force -SkipPublisherCheck -Scope CurrentUser
Import-Module Pester -MinimumVersion 5.5.0