ODS V3 Pre-Release: Public testing and refinement ahead of the official V3 launch. Turn your PC, Mac, or Linux box into a private AI server.
Python ai-agentsamdcomfyuidockerllama-cppllmlocal-ain8nnvidiaopen-webuiragself-hostedspeech-to-textstrix-halotext-to-speechworkflow-automation
fix(ci): install script analyzer through PSResourceGet (#8239)
Mike Bradley9be4cd87a8f4
diff --git a/.github/workflows/lint-powershell.yml b/.github/workflows/lint-powershell.ymlindex ae7491bb9..f5c255002 100644--- a/.github/workflows/lint-powershell.yml+++ b/.github/workflows/lint-powershell.yml@@ -28,25 +28,15 @@ jobs:shell: pwshrun: |$ErrorActionPreference = 'Stop'- [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12-- if (-not (Get-PackageProvider -Name NuGet -ListAvailable -ErrorAction SilentlyContinue)) {- Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Scope CurrentUser -Force -ForceBootstrap- }-- if (-not (Get-PSRepository -Name PSGallery -ErrorAction SilentlyContinue)) {- Register-PSRepository -Default- }- Set-PSRepository -Name PSGallery -InstallationPolicy Trusted-- Install-Module -Name PSScriptAnalyzer -Repository PSGallery -Scope CurrentUser -Force -AllowClobber- Import-Module PSScriptAnalyzer -ErrorAction Stop+ # Hosted PowerShell 7 includes PSResourceGet. Avoid the legacy+ # NuGet provider bootstrap, which can fail to register PSGallery.+ Import-Module Microsoft.PowerShell.PSResourceGet -ErrorAction Stop+ $requiredVersion = '1.25.0'+ Install-PSResource -Name PSScriptAnalyzer -Version $requiredVersion `+ -Repository PSGallery -Scope CurrentUser -TrustRepository -Reinstall -Quiet+ Import-Module PSScriptAnalyzer -RequiredVersion $requiredVersion -ErrorAction StopGet-Command Invoke-ScriptAnalyzer -Module PSScriptAnalyzer -ErrorAction Stop | Out-NullGet-Module PSScriptAnalyzer | Format-Table Name, Version, Path -AutoSize- # NuGet may leave a nonzero native exit code after a recovered setup- # error. Clear it only after the module and analyzer command load;- # installation/import failures still terminate before this point.- $global:LASTEXITCODE = 0- name: Run PowerShell Script Analyzershell: pwsh