Fix install script (#175)

This commit is contained in:
Sung Won Cho 2019-05-10 17:57:51 +10:00 committed by GitHub
commit a56d711a44
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -148,8 +148,8 @@ install_dnote() {
# get the latest version
resp=$(http_get "https://api.github.com/repos/$owner/$repo/tags")
version=$(echo "$resp" | tr ',' '\n' | grep -m 1 "\"name\": \"cli" | cut -f4 -d'"')
resp=$(http_get "https://api.github.com/repos/$owner/$repo/releases")
version=$(echo "$resp" | tr ',' '\n' | grep -m 1 "\"tag_name\": \"cli" | cut -f4 -d'"')
if [ -z "$version" ]; then
print_error "Error fetching latest version. Please try again."