@@ -176,6 +176,15 @@ process_tool() {
176176 local homepage=" $( catalog_get_property " $catalog_tool " homepage) "
177177 local auto_update=" $( config_get_auto_update " $catalog_tool " ) "
178178
179+ # Check if runtime requirements are satisfied (e.g., npm requires node)
180+ local missing_req
181+ missing_req=" $( catalog_check_requires " $catalog_tool " ) " || true
182+ if [ -n " $missing_req " ]; then
183+ printf " \n==> ⏭️ %s\n" " $display "
184+ printf " skipped: requires '%s' which is not installed\n" " $missing_req "
185+ return 0
186+ fi
187+
179188 # Check if migration needed (deprecated install method)
180189 # But skip migration if native binary already exists and works
181190 local needs_migration=" "
@@ -276,7 +285,7 @@ process_tool() {
276285 local all_installs
277286 all_installs=" $( detect_all_installations " $catalog_tool " " $binary_name " 2> /dev/null || true) "
278287 local install_count
279- install_count=" $( echo " $all_installs " | grep -c . || echo 0 ) "
288+ install_count=" $( echo " $all_installs " | grep -c . || true ) "
280289 if [ " $install_count " -gt 1 ]; then
281290 printf " ⚠️ Multiple installations detected (%d):\n" " $install_count "
282291 echo " $all_installs " | while IFS=: read -r inst_method inst_path; do
@@ -303,20 +312,26 @@ process_tool() {
303312 printf " Y = Upgrade now (default)\n"
304313 printf " a = Always update (upgrade now + auto-update in future)\n"
305314 printf " n = Skip (ask again next time)\n"
306- printf " s = Skip version %s (ask again if newer available)\n" " $latest "
307- printf " p = Pin to %s (don't ask for upgrades)\n" " $installed "
315+ printf " s = Skip only %s (ask again when newer patch available)\n" " $latest "
316+ if [ -n " $is_multi_version " ]; then
317+ printf " p = Pin %s cycle to %s (don't upgrade)\n" " $version_cycle " " $installed "
318+ else
319+ printf " p = Pin to %s (don't ask for upgrades)\n" " $installed "
320+ fi
308321 printf " r = Remove/uninstall this tool\n"
309322 if [ -n " $is_multi_version " ]; then
310- printf " P = Skip all %s versions (never install any)\n" " $catalog_tool "
323+ printf " P = Skip ALL %s cycles (never install any %s )\n" " $catalog_tool " " $catalog_tool "
311324 fi
312325 else
313326 printf " y = Install now\n"
314327 printf " a = Always update (install now + auto-update in future)\n"
315328 printf " N = Skip (default, ask again next time)\n"
316- printf " s = Skip version %s (ask again if newer available)\n" " $latest "
317- printf " p = Never install (permanently skip this version)\n"
329+ printf " s = Skip only %s (ask again when newer patch available)\n" " $latest "
318330 if [ -n " $is_multi_version " ]; then
319- printf " P = Skip all %s versions (never install any)\n" " $catalog_tool "
331+ printf " p = Never install %s (skip entire %s.x cycle)\n" " $display " " $version_cycle "
332+ printf " P = Skip ALL %s cycles (never install any %s)\n" " $catalog_tool " " $catalog_tool "
333+ else
334+ printf " p = Never install (permanently skip this tool)\n"
320335 fi
321336 fi
322337
@@ -453,26 +468,49 @@ process_tool() {
453468 fi
454469 ;;
455470 [Ss])
456- # Skip this specific version
457- printf " Skipping version %s (will prompt again if newer version available)\n" " $latest "
471+ # Skip this specific patch version only
472+ printf " Skipping only %s (will prompt again when newer patch available)\n" " $latest "
458473 " $ROOT " /scripts/pin_version.sh " $tool " " $latest " || true
459474 ;;
460475 [p])
461476 if [ -n " $installed " ]; then
462477 # Pin to current version
463- printf " Pinning to current version %s\n" " $installed "
478+ if [ -n " $is_multi_version " ]; then
479+ printf " Pinning %s cycle to %s\n" " $version_cycle " " $installed "
480+ else
481+ printf " Pinning to current version %s\n" " $installed "
482+ fi
464483 " $ROOT " /scripts/pin_version.sh " $tool " " $installed " || true
465484 else
466- # Never install - pin to "never" for this specific version
467- printf " Marking as 'never install' (permanently skip this version)\n"
485+ # Never install - pin to "never" for this version cycle
486+ if [ -n " $is_multi_version " ]; then
487+ printf " Marking %s cycle as 'never install'\n" " $version_cycle "
488+ else
489+ printf " Marking as 'never install' (permanently skip this tool)\n"
490+ fi
468491 " $ROOT " /scripts/pin_version.sh " $tool " " never" || true
469492 fi
470493 ;;
471494 [r])
472495 # Remove/uninstall this tool (only for installed tools)
473496 if [ -n " $installed " ]; then
474497 printf " Removing %s...\n" " $tool "
475- " $ROOT " /scripts/install_tool.sh " $catalog_tool " uninstall || true
498+ # Pass version cycle for multi-version tools so only that cycle is removed
499+ if [ -n " $is_multi_version " ] && [ -n " $version_cycle " ]; then
500+ if [ " $catalog_tool " = " node" ]; then
501+ NODE_VERSION=" $version_cycle " " $ROOT " /scripts/install_tool.sh " $catalog_tool " uninstall || true
502+ elif [ " $catalog_tool " = " python" ]; then
503+ UV_PYTHON_SPEC=" $version_cycle " " $ROOT " /scripts/install_tool.sh " $catalog_tool " uninstall || true
504+ elif [ " $catalog_tool " = " go" ]; then
505+ GO_VERSION=" $version_cycle " " $ROOT " /scripts/install_tool.sh " $catalog_tool " uninstall || true
506+ elif [ " $catalog_tool " = " php" ]; then
507+ PHP_VERSION=" $version_cycle " " $ROOT " /scripts/install_tool.sh " $catalog_tool " uninstall || true
508+ else
509+ " $ROOT " /scripts/install_tool.sh " $catalog_tool " uninstall || true
510+ fi
511+ else
512+ " $ROOT " /scripts/install_tool.sh " $catalog_tool " uninstall || true
513+ fi
476514
477515 # Re-audit to update snapshot
478516 CLI_AUDIT_JSON=1 CLI_AUDIT_COLLECT=1 CLI_AUDIT_MERGE=1 " $CLI " audit.py " $tool " > /dev/null 2>&1 || true
0 commit comments