diff --git a/CHANGELOG.md b/CHANGELOG.md index aeb944a..d6960e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## [0.8.1] - 2026-03-01 + +### Fixed +- `install.sh`: removed `-f` flag from GitHub API `curl` call so HTTP error responses (rate limits, 404s) are printed instead of silently discarded; shows up to 400 bytes of the raw API response when the release tag cannot be parsed + ## [0.8.0] - 2026-03-01 ### Added diff --git a/Cargo.toml b/Cargo.toml index 6656bb5..d5c744e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tmuxido" -version = "0.8.0" +version = "0.8.1" edition = "2024" [dev-dependencies] diff --git a/install.sh b/install.sh index b2cc8d1..cecd033 100644 --- a/install.sh +++ b/install.sh @@ -16,12 +16,16 @@ case "$arch" in *) echo "Unsupported architecture: $arch" >&2; exit 1 ;; esac -tag=$(curl -fsSL \ +api_resp=$(curl -sSL \ -H "Accept: application/vnd.github.v3+json" \ - "$API_URL/repos/$REPO/releases/latest" \ - | grep -o '"tag_name":"[^"]*"' | cut -d'"' -f4) + "$API_URL/repos/$REPO/releases/latest") +tag=$(printf '%s' "$api_resp" | grep -o '"tag_name":"[^"]*"' | cut -d'"' -f4) -[ -z "$tag" ] && { echo "Could not fetch latest release" >&2; exit 1; } +if [ -z "$tag" ]; then + echo "Could not fetch latest release." >&2 + printf 'GitHub API response: %s\n' "$api_resp" | head -c 400 >&2 + exit 1 +fi echo "Installing tmuxido $tag..."