From b759ba47a179aa0b13d212205d81d87be9e4ae4d Mon Sep 17 00:00:00 2001 From: yaowenc2 Date: Wed, 15 Jul 2026 09:45:49 +0800 Subject: [PATCH] =?UTF-8?q?fix(install):=20show=20download=20progress=20?= =?UTF-8?q?=E2=80=94=2060MB=20binary=20looked=20frozen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit install.sh downloaded the ~60MB Bun binary with 'curl -fsSL' (silent), so after 'Installing insta…' it showed nothing for the whole download and read as a hang (user report). Now --progress-bar to a TTY (quiet when piped without one), and the message states the size. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01GMbAe5K1RfwaAcge5inX7P --- install.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 55423df..36b6b2c 100644 --- a/install.sh +++ b/install.sh @@ -82,8 +82,11 @@ fi tmp="$(mktemp -d)" trap 'rm -rf "$tmp"' EXIT -echo "Installing $BIN ($asset, $version)…" -curl -fsSL "$base/$asset" -o "$tmp/$BIN" || { echo "error: download failed ($base/$asset)" >&2; exit 1; } +echo "Installing $BIN ($asset, $version) — downloading ~60MB…" +# --progress-bar (not -s): the binary is ~60MB, so a silent download looks frozen. Show progress +# to a TTY; stay quiet when piped without one. Keep the tiny SHA256SUMS fetch silent. +if [ -t 2 ]; then dl="curl -fL --progress-bar"; else dl="curl -fsSL"; fi +$dl "$base/$asset" -o "$tmp/$BIN" || { echo "error: download failed ($base/$asset)" >&2; exit 1; } curl -fsSL "$base/SHA256SUMS" -o "$tmp/SHA256SUMS" || { echo "error: could not fetch SHA256SUMS" >&2; exit 1; } # ---- verify checksum ----