Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions catalog/pip.json
Original file line number Diff line number Diff line change
Expand Up @@ -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."
}
23 changes: 15 additions & 8 deletions scripts/guide.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand Down Expand Up @@ -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 <unknown>
Expand All @@ -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
Expand All @@ -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
Expand Down
Loading