client9 / shlib

portable functions for posix shell environments
The Unlicense
365 stars 36 forks source link

github_release always returns 0, even if release doesn't exist #5

Closed client9 closed 6 years ago

client9 commented 6 years ago
$ . ./is_command.sh 
$ . ./log.sh
$ . ./http_download.sh 
$ . ./github_release.sh 
$ github_release client9/misspell
v0.3.4
$ echo $?
0
# correct ^^

# non existant version number
$ github_release client9/misspell xxx
curl: (22) The requested URL returned error: 404 Not Found
$ echo $?
0

# this repo doesn't have any releases
$ github_release client9/shlib
curl: (22) The requested URL returned error: 406 Not Acceptable
$ echo $?
0
client9 commented 6 years ago

fixed