From e70b313f92f85f90cde8b98ad1e648c27f1d708c Mon Sep 17 00:00:00 2001 From: Claude Code Bot Date: Sun, 16 Aug 2026 18:48:08 -0700 Subject: [PATCH] docs(readme): document Bash 4 requirement, drop sudo from dry-run example Two corrections found while reading install.sh against the README: 1. install.sh uses the `mapfile` builtin (lines 251, 259, 502, 573, 585), which is Bash 4.0+. macOS ships Bash 3.2 at /bin/bash, so the script fails on a stock system unless a newer Bash is earlier on PATH. The Requirements section listed only "macOS 10.6+" and tools that "ship with macOS", which implies no extra install is needed. Added the Bash 4 requirement with the brew install line. 2. The Examples section showed `sudo ./install.sh --dry-run`, but check_root() short-circuits when DRY_RUN is true, so --dry-run never needs root. Removed the sudo and noted why. Docs only; no behavior change. --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1103eba..5094dc7 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,9 @@ The mirror list is in [`mirrors.txt`](./mirrors.txt), updated monthly by a GitHu ## Requirements - macOS 10.6+ (any version with `/etc/resolver` support) +- Bash 4.0 or newer, on your `PATH`. macOS ships Bash 3.2 at `/bin/bash`, which + lacks the `mapfile` builtin this script relies on. Install a current Bash with + `brew install bash`. - `sudo` / root access (for install/uninstall only) - `curl` and `python3` (both ship with macOS) @@ -61,8 +64,8 @@ Options: # Standard install / update (fetches latest mirrors.txt from GitHub) sudo ./install.sh -# Preview what would change -sudo ./install.sh --dry-run +# Preview what would change (no root needed; --dry-run skips the root check) +./install.sh --dry-run # Update mirrors.txt from Wikipedia, then install ./install.sh --update-mirrors && sudo ./install.sh --no-fetch