Skip to content

Commit 1308b9a

Browse files
authored
Fix release version fetching
Previously this was returning the `body` of the API response, which caused installation to fail. Now it returns the version number. This could be done much cleaner with `jq`, but I'm assuming you'd rather not introduce that dependency.
1 parent 99fccda commit 1308b9a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ error() {
4848
}
4949

5050
# Fetch the latest release tag from GitHub API
51-
LATEST_RELEASE=$(curl -s $REPO_URL | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
51+
curl -s $REPO_URL | grep -o '"tag_name": *"[^"]*"' | sed 's/.*": *"\([^"]*\)".*/\1/'
5252

5353
echo ""
5454
info "Latest release: $LATEST_RELEASE"

0 commit comments

Comments
 (0)