chore: fix latest install to cater for existing users who installed using '-s latest' (#3513)

This commit is contained in:
Herman van Zyl 2023-01-28 15:54:24 +02:00 committed by GitHub
parent d57156ec22
commit 52e2f9338e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -317,7 +317,7 @@ http_copy() {
github_release() {
owner_repo=$1
version=$2
if [ -z "$version" ]; then
if [ -z "$version" ] || [ "$version" = "latest" ]; then
giturl="https://api.github.com/repos/${owner_repo}/releases/latest"
else
giturl="https://api.github.com/repos/${owner_repo}/releases/tags/${version}"