🐛 fix: show GitHub API response when install.sh fails to fetch release
Remove -f from curl API call so HTTP errors are visible instead of silently swallowed; print up to 400 bytes of the raw response to stderr. Bumps version to 0.8.1.
This commit is contained in:
parent
0e2745acf1
commit
a8f88e852c
@ -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
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "tmuxido"
|
||||
version = "0.8.0"
|
||||
version = "0.8.1"
|
||||
edition = "2024"
|
||||
|
||||
[dev-dependencies]
|
||||
|
||||
12
install.sh
12
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..."
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user