Skip to content

Commit 9432e67

Browse files
authored
Fix github latest URL (#918)
1 parent e85e1a7 commit 9432e67

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

install.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,8 +280,10 @@ http_copy() {
280280
github_release() {
281281
owner_repo=$1
282282
version=$2
283-
test -z "$version" && version="latest"
284283
giturl="https://api.github.com/repos/${owner_repo}/releases/tags/${version}"
284+
if [ -z "${version}" ]; then
285+
giturl="https://api.github.com/repos/${owner_repo}/releases/latest"
286+
fi
285287
json=$(http_copy "$giturl" "Accept:application/json")
286288
test -z "$json" && return 1
287289
version=$(echo "$json" | tr -s '\n' ' ' | sed 's/.*"tag_name": *"//' | sed 's/".*//')

0 commit comments

Comments
 (0)