Skip to content

Commit 9e474d3

Browse files
taylorarndtclaude
andcommitted
fix: bash 3 compat, plugin key matching, and manifest guard
- Replace declare -A (bash 4+) with string-based dedup for macOS bash 3 - Match both 'a11y-agent-team@' and 'accessibility-agents@' plugin keys - Parse plugin cache path from key format (name@namespace) - Guard add_manifest_entry calls for plugin install path Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent b3e5fbf commit 9e474d3

3 files changed

Lines changed: 20 additions & 16 deletions

File tree

install.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1548,11 +1548,13 @@ PLIST
15481548
fi
15491549
fi
15501550

1551-
# Record install scope for uninstaller
1552-
if [ "$choice" = "1" ]; then
1553-
add_manifest_entry "scope:project"
1554-
else
1555-
add_manifest_entry "scope:global"
1551+
# Record install scope for uninstaller (only for file-copy installs that have a manifest)
1552+
if command -v add_manifest_entry &>/dev/null 2>&1 || type add_manifest_entry &>/dev/null 2>&1; then
1553+
if [ "$choice" = "1" ]; then
1554+
add_manifest_entry "scope:project"
1555+
else
1556+
add_manifest_entry "scope:global"
1557+
fi
15561558
fi
15571559

15581560
# Clean up temp download

uninstall.ps1

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ if ($Choice -eq "2") {
374374
$PluginData = Get-Content $PluginsJson -Raw | ConvertFrom-Json
375375
$RemovedKey = $null
376376
foreach ($Key in @($PluginData.plugins.PSObject.Properties.Name)) {
377-
if ($Key -like "a11y-agent-team@*") {
377+
if ($Key -like "a11y-agent-team@*" -or $Key -like "accessibility-agents@*") {
378378
$RemovedKey = $Key
379379
$PluginData.plugins.PSObject.Properties.Remove($Key)
380380
break
@@ -395,8 +395,9 @@ if ($Choice -eq "2") {
395395
}
396396
}
397397

398-
$Namespace = $RemovedKey -replace '^a11y-agent-team@', ''
399-
$PluginCache = Join-Path $env:USERPROFILE ".claude\plugins\cache\$Namespace\a11y-agent-team"
398+
$PluginName = ($RemovedKey -split '@')[0]
399+
$Namespace = ($RemovedKey -split '@')[1]
400+
$PluginCache = Join-Path $env:USERPROFILE ".claude\plugins\cache\$Namespace\$PluginName"
400401
if (Test-Path $PluginCache) {
401402
Remove-Item -Path $PluginCache -Recurse -Force
402403
Write-Host " - Removed plugin cache"

uninstall.sh

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -432,11 +432,11 @@ else
432432
fi
433433

434434
GEMINI_REMOVED=false
435-
# Deduplicate paths
436-
declare -A seen_paths
435+
# Deduplicate paths (bash 3 compatible — no associative arrays)
436+
_seen_paths=""
437437
for gemini_dir in "${GEMINI_PATHS[@]}"; do
438-
[ -n "${seen_paths[$gemini_dir]+x}" ] && continue
439-
seen_paths[$gemini_dir]=1
438+
case "$_seen_paths" in *"|$gemini_dir|"*) continue ;; esac
439+
_seen_paths="${_seen_paths}|${gemini_dir}|"
440440
if [ -d "$gemini_dir" ]; then
441441
echo ""
442442
echo " Removing Gemini CLI extension..."
@@ -466,7 +466,7 @@ with open(path) as f:
466466
data = json.load(f)
467467
removed = None
468468
for k in list(data.get('plugins', {})):
469-
if k.startswith('a11y-agent-team@'):
469+
if k.startswith('a11y-agent-team@') or k.startswith('accessibility-agents@'):
470470
removed = k
471471
del data['plugins'][k]
472472
break
@@ -492,9 +492,10 @@ with open(path, 'w') as f:
492492
PYEOF
493493
echo " - Removed from settings.json enabledPlugins"
494494
fi
495-
# Remove plugin cache
496-
namespace="${removed_key#a11y-agent-team@}"
497-
cache_dir="$HOME/.claude/plugins/cache/${namespace}/a11y-agent-team"
495+
# Remove plugin cache — key format is "name@namespace"
496+
plugin_name="${removed_key%%@*}"
497+
namespace="${removed_key#*@}"
498+
cache_dir="$HOME/.claude/plugins/cache/${namespace}/${plugin_name}"
498499
if [ -d "$cache_dir" ]; then
499500
rm -rf "$cache_dir"
500501
echo " - Removed plugin cache"

0 commit comments

Comments
 (0)