fix: Install base packages on macOS via Homebrew too#197
Merged
Conversation
Fold the macOS path into the same pkg_update/pkg_install/pkg_installed case-switches apt/dnf/pacman already use, so it installs git, python3, MariaDB, PostgreSQL and Node up front instead of leaving everything to the runtime's lazy brew installs (which assume brew already exists). Also makes run_sudo prompt for a sudo password itself via /dev/tty when one is needed and --sudo-password wasn't passed, since piping this script through curl | sh leaves stdin occupied by the script itself. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Contributor
Confidence Score: 5/5Safe to merge; changes are confined to install.sh and the macOS path is isolated from all other distro flows. The macOS additions are well-scoped: ensure_homebrew guards every brew call, pkg_update/pkg_install/pkg_installed are consistent, and the subshell-exit bug from prior review threads is now correctly fixed with || exit 1 at both call sites. No new logic bugs were found. install.sh — the ensure_homebrew and run_sudo /dev/tty prompting paths are the only novel flows. Reviews (5): Last reviewed commit: "fix: install.sh installs curl before any..." | Re-trigger Greptile |
Extract the MariaDB apt repo setup into add_distro_repos(), called before the single pkg_update() in bootstrap() so one apt-get update picks up both the base indices and the new repo, instead of a second one buried inside install_database_engines(). bootstrap()'s call sequence now reads top-to-bottom as the actual order of operations. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
bootstrap_needed() is now platform-aware (checks for brew on macOS instead of curl/bash/sudo, which macOS always ships), so bootstrap() no longer needs a separate "DISTRO != macos" branch — every platform goes through the same root/non-root, tool-missing gate. ensure_homebrew() also primes the sudo timestamp cache via run_sudo before invoking Homebrew's installer, so a --sudo-password passed to this script covers the installer's own internal sudo calls (needed on Intel Macs for initial /usr/local setup) instead of prompting again on a /dev/tty our wrapper doesn't control. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
tmp="$(download_installer "$url")" relies on set -e to abort the script when the download is invalid, but command substitution's exit status propagating through -e is inconsistent across shells/contexts. Add an explicit || exit 1 at both call sites so a bad download can't silently fall through as an empty $tmp. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
add_distro_repos() (MariaDB apt repo) and later NodeSource/Homebrew setup all go through fetch_and_run_as_root, which needs curl — but curl was only installed later, as part of bootstrap_packages(). Add ensure_curl(), run first in bootstrap(), so a bare image without curl doesn't fail on the very first download. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
3 tasks
amitascra
pushed a commit
to amitascra/bench-cli
that referenced
this pull request
Jul 16, 2026
Adds scripts/smoke_install_macos.sh and a smoke-macos job in install-smoke.yml, running on macos-14 directly (no container runtime available for macOS, unlike the Linux distro matrix) since the macOS path (PR frappe#197) has no CI coverage yet — it installs Homebrew, git, python3, MariaDB, PostgreSQL and Node for real, then asserts bench, the admin venv, node and git are all in place. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
tanmoysrt
pushed a commit
to tanmoysrt/bench-cli
that referenced
this pull request
Jul 18, 2026
…support fix: Install base packages on macOS via Homebrew too
tanmoysrt
pushed a commit
to tanmoysrt/bench-cli
that referenced
this pull request
Jul 18, 2026
Adds scripts/smoke_install_macos.sh and a smoke-macos job in install-smoke.yml, running on macos-14 directly (no container runtime available for macOS, unlike the Linux distro matrix) since the macOS path (PR frappe#197) has no CI coverage yet — it installs Homebrew, git, python3, MariaDB, PostgreSQL and Node for real, then asserts bench, the admin venv, node and git are all in place. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test plan
uv run --extra test --extra admin pytest tests/ -q(835 passed)sh -n install.sh