fix(ci): tolerate missing client CLIs
This commit is contained in:
1 parent
cf8e7cfc1b
commit
7558addb79
3 files changed
+4
-1
No files matched your search
@@ -82,6 +82,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
if [ "${POWERSHELL_AVAILABLE:-false}" != true ]; then exit 0; fi
|
if [ "${POWERSHELL_AVAILABLE:-false}" != true ]; then exit 0; fi
|
||||||
pwsh -NoLogo -NoProfile -NonInteractive -File ./scripts/commands/check-capabilities.ps1
|
pwsh -NoLogo -NoProfile -NonInteractive -File ./scripts/commands/check-capabilities.ps1
|
||||||
|
pwsh -NoLogo -NoProfile -NonInteractive -File ./scripts/commands/build.ps1 -Summary
|
||||||
for file in scripts/tests/test-*.ps1; do
|
for file in scripts/tests/test-*.ps1; do
|
||||||
echo "==> $file"
|
echo "==> $file"
|
||||||
pwsh -NoLogo -NoProfile -NonInteractive -File "$file" -Summary
|
pwsh -NoLogo -NoProfile -NonInteractive -File "$file" -Summary
|
||||||
|
|||||||
@@ -39,7 +39,8 @@ function Get-InstalledPlugins {
|
|||||||
[ValidateSet('Claude','Codex')][string]$Client,
|
[ValidateSet('Claude','Codex')][string]$Client,
|
||||||
[string]$HomePath = [Environment]::GetFolderPath('UserProfile')
|
[string]$HomePath = [Environment]::GetFolderPath('UserProfile')
|
||||||
)
|
)
|
||||||
$command = Get-Command $Client.ToLowerInvariant() -ErrorAction Stop
|
$command = Get-Command $Client.ToLowerInvariant() -ErrorAction SilentlyContinue
|
||||||
|
if (-not $command) { return @() }
|
||||||
$environment = @{
|
$environment = @{
|
||||||
HOME = $HomePath
|
HOME = $HomePath
|
||||||
USERPROFILE = $HomePath
|
USERPROFILE = $HomePath
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ set -euo pipefail
|
|||||||
plugin_installed() {
|
plugin_installed() {
|
||||||
local client=$1 plugin=$2
|
local client=$1 plugin=$2
|
||||||
local inventory
|
local inventory
|
||||||
|
command -v "$client" >/dev/null 2>&1 || return 1
|
||||||
inventory=$("$client" plugin list --json) || return 2
|
inventory=$("$client" plugin list --json) || return 2
|
||||||
printf '%s' "$inventory" | python3 -c '
|
printf '%s' "$inventory" | python3 -c '
|
||||||
import json, sys
|
import json, sys
|
||||||
|
|||||||
Reference in new issue
Block a user