Skip to content

Commit e5c086c

Browse files
CybotTMclaude
andcommitted
fix(guide): skip pinned tools from upgrade prompts
Fixed bug where pinned tools were still being prompted for upgrades even though they had pinned_version set in their catalog entries. Previous logic: Only skip if pinned_version >= latest_version Problem: This meant pinned tools with newer versions available would still be prompted for upgrade New logic: Skip any tool with pinned_version set (except "never") Behavior: Pinned tools are completely excluded from upgrade prompts, which is the expected behavior of version pinning Examples: - ctags pinned to 5.9.0 (latest 6.2.1) → now skipped - node pinned to 25.0.0 (latest 25.1.0) → now skipped 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 8f6b6eb commit e5c086c

1 file changed

Lines changed: 4 additions & 29 deletions

File tree

scripts/guide.sh

Lines changed: 4 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -234,42 +234,17 @@ while read -r line; do
234234

235235
# Only process tools with catalog entries
236236
if catalog_has_tool "$tool_name"; then
237-
# Check if tool is pinned to a version >= latest available or "never"
237+
# Check if tool is pinned
238238
pinned_version="$(catalog_get_property "$tool_name" pinned_version)"
239239

240240
# Skip if pinned to "never" (permanently skip installation)
241241
if [ "$pinned_version" = "never" ]; then
242242
continue
243243
fi
244244

245-
latest_version="$(json_field "$tool_name" latest_version)"
246-
247-
if [ -n "$pinned_version" ] && [ -n "$latest_version" ]; then
248-
# Compare versions: skip if latest <= pinned
249-
# Simple numeric comparison for semantic versions
250-
if "$CLI" - "$pinned_version" "$latest_version" <<'PY'
251-
import sys
252-
try:
253-
pinned, latest = sys.argv[1], sys.argv[2]
254-
# Strip 'v' prefix if present
255-
pinned = pinned.lstrip('v')
256-
latest = latest.lstrip('v')
257-
# Split into parts and compare
258-
p_parts = [int(x) for x in pinned.split('.')[:3]]
259-
l_parts = [int(x) for x in latest.split('.')[:3]]
260-
# Pad with zeros if needed
261-
while len(p_parts) < 3: p_parts.append(0)
262-
while len(l_parts) < 3: l_parts.append(0)
263-
# Exit 0 (success) if latest <= pinned (should skip)
264-
sys.exit(0 if tuple(l_parts) <= tuple(p_parts) else 1)
265-
except Exception:
266-
# On error, don't skip (exit 1)
267-
sys.exit(1)
268-
PY
269-
then
270-
# Skip this tool - pinned version is >= latest available
271-
continue
272-
fi
245+
# Skip if pinned to any specific version (don't prompt for upgrades)
246+
if [ -n "$pinned_version" ]; then
247+
continue
273248
fi
274249

275250
TOOLS_TO_PROCESS+=("$tool_name")

0 commit comments

Comments
 (0)