Skip to content

Commit

Permalink
apply suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
war-in committed Jan 17, 2024
1 parent e6224d6 commit a330349
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ main () {
check_cmd tar

version=${1:-latest}
release_tag=$(curl -# -Ls -H 'Accept: application/json' "${REPO}/releases/{$version}" | sed -e 's/.*"tag_name":"\([^"]*\)".*/\1/')
release_tag=$(curl -# --fail -Ls -H 'Accept: application/json' "${REPO}/releases/{$version}" | sed -e 's/.*"tag_name":"\([^"]*\)".*/\1/')

if [[ $release_tag == *"error"* ]]; then
echo "Please pass correct version (e.g. \"v1.0.0\")"
if [ -z "$release_tag" ]; then
echo "No such version $version, please pass correct one (e.g. v1.0.0)"
exit 1
fi

Expand Down

0 comments on commit a330349

Please sign in to comment.