fix(update.sh): report why gum auto-install failed instead of failing silently

curl -fsSL | tar swallowed curl errors entirely, so a network failure
fetching gum looked identical to a successful skip - just silently
dropped into the plain-prompt fallback with no explanation.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Bs8xf8Dt8X6tRBvBiLCXYc
This commit is contained in:
2026-09-07 20:01:20 +02:00
co-authored by Claude-Bot
parent 7a654ead91
commit feb7469f0b
+3 -1
View File
@@ -70,7 +70,9 @@ ensure_gum() {
esac
url="https://github.com/charmbracelet/gum/releases/download/v${GUM_VERSION}/gum_${GUM_VERSION}_Linux_${arch}.tar.gz"
tmpdir="$(mktemp -d)"
if curl -fsSL "$url" | tar -xz -C "$tmpdir" 2>/dev/null; then
if ! curl -fsSL "$url" | tar -xz -C "$tmpdir" 2>/dev/null; then
echo "couldn't download gum from $url (no internet egress? falling back to plain prompts)" >&2
else
find "$tmpdir" -name gum -type f -exec cp {} "$GUM_BIN" \;
chmod +x "$GUM_BIN" 2>/dev/null || true
fi