diff --git a/install.sh b/install.sh index dc7a39e..d6f0e17 100755 --- a/install.sh +++ b/install.sh @@ -31,7 +31,11 @@ if [ -n "${VERSION:-}" ]; then fi else echo "Fetching latest release..." - TAG=$(curl -sSfL "$API" | grep -oP '"tag_name": "\K(.*)(?=")') + TAG=$(curl -sSfL "$API" | sed -n 's/.*"tag_name":[[:space:]]*"\([^"]*\)".*/\1/p' | head -n1) + if [ -z "$TAG" ]; then + echo "Error: could not determine latest release tag" + exit 1 + fi echo "Latest version: $TAG" fi