From d008643dd431905ae8bf2d5ce91ddf86cee8b78c Mon Sep 17 00:00:00 2001 From: Sebastian Mendel Date: Tue, 7 Jul 2026 12:57:44 +0200 Subject: [PATCH 1/2] fix(scripts): auto-update upgrades existing tools, never bootstraps missing ones The interactive upgrade guide treated auto_update=true as "install or upgrade", so a tool that was not installed (e.g. pip) was freshly installed on our behalf. Guard the auto-update path on install state: skip uninstalled tools and leave deliberate installs to the interactive prompt, deferring package acquisition to uv/bun. Drop the now-unreachable fresh-install branch and the SUMMARY_INSTALLED counter it fed (interactive installs already count as Updated). Signed-off-by: Sebastian Mendel --- scripts/guide.sh | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/scripts/guide.sh b/scripts/guide.sh index 9374f13..7795541 100755 --- a/scripts/guide.sh +++ b/scripts/guide.sh @@ -18,7 +18,6 @@ IGNORE_PINS="${IGNORE_PINS:-0}" # Summary counters SUMMARY_UPDATED=0 -SUMMARY_INSTALLED=0 SUMMARY_SKIPPED=0 SUMMARY_FAILED=0 SUMMARY_REMOVED=0 @@ -28,7 +27,6 @@ print_summary() { echo "================================================================================" echo "Summary${label:+ ($label)}" echo "================================================================================" - printf " Installed: %d\n" "$SUMMARY_INSTALLED" printf " Updated: %d\n" "$SUMMARY_UPDATED" printf " Removed: %d\n" "$SUMMARY_REMOVED" printf " Skipped: %d\n" "$SUMMARY_SKIPPED" @@ -348,6 +346,17 @@ process_tool() { # For multi-version tools the key is cycle-qualified (e.g. python@3.13), so # each cycle opts in independently. if [ "$auto_update" = "true" ]; then + # Auto-update keeps *existing* tools current; it must never bootstrap a + # missing tool. Tools like pip are intentionally left to uv/bun rather than + # installed on our behalf. When the tool isn't installed, report the skip + # and return. Deliberate installs are offered only by the interactive + # prompt below, which is reached when auto-update is not enabled. + if [ -z "$installed" ]; then + printf "\n==> ⏭️ %s [auto-update]\n" "$display" + printf " not installed; skipping (auto-update upgrades existing tools only)\n" + SUMMARY_SKIPPED=$((SUMMARY_SKIPPED + 1)) + return 0 + fi printf "\n==> %s %s [auto-update]\n" "$icon" "$display" print_installed_status "$installed" "$method" # Show target; for self-managed tools (skip_upstream) show "self-managed" instead of @@ -360,12 +369,12 @@ process_tool() { check_multi_installs "$catalog_tool" printf " auto-updating...\n" - # Build install command from catalog metadata (use catalog_tool for script name) - local install_cmd="install_tool.sh $catalog_tool" + # Build the upgrade command from catalog metadata (use catalog_tool for + # script name). The tool is guaranteed installed here, so this is always an + # update unless the catalog defines an explicit install_action. + local install_cmd="install_tool.sh $catalog_tool update" if [ -n "$install_action" ]; then install_cmd="install_tool.sh $catalog_tool $install_action" - elif [ -n "$installed" ]; then - install_cmd="install_tool.sh $catalog_tool update" fi # Execute the install with version-specific environment variables @@ -391,8 +400,6 @@ process_tool() { rm -f "/tmp/.cli-audit/${catalog_tool}.already-current" if [ "$auto_update_success" = "0" ]; then SUMMARY_FAILED=$((SUMMARY_FAILED + 1)) - elif [ -z "$installed" ]; then - SUMMARY_INSTALLED=$((SUMMARY_INSTALLED + 1)) else SUMMARY_UPDATED=$((SUMMARY_UPDATED + 1)) fi From 53acb7ebc4765070b0b44e1c939ef5b764452f08 Mon Sep 17 00:00:00 2001 From: Sebastian Mendel Date: Tue, 7 Jul 2026 12:57:51 +0200 Subject: [PATCH 2/2] fix(catalog): detect pip via the pip3 binary Systems commonly expose only pip3, not a bare pip. Add pip3 to the detection candidates (mirroring fd/fdfind) so an existing pip is recognized and kept current by auto-update instead of being reported as not installed. Signed-off-by: Sebastian Mendel --- catalog/pip.json | 1 + 1 file changed, 1 insertion(+) diff --git a/catalog/pip.json b/catalog/pip.json index 6976a35..c1505d9 100644 --- a/catalog/pip.json +++ b/catalog/pip.json @@ -6,6 +6,7 @@ "homepage": "https://pip.pypa.io/", "package_name": "pip", "binary_name": "pip", + "candidates": ["pip", "pip3"], "script": "install_pip.sh", "notes": "pip is bundled with Python 3. Use python3 -m pip if pip command is not available." }