From e050996fd4d153f59cce0c9483851cae4963908d Mon Sep 17 00:00:00 2001 From: "Max P." Date: Mon, 24 Nov 2025 12:32:42 +0100 Subject: [PATCH] fix(scripts): improve version argument handling in install script --- scripts/install-git-cliff.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/install-git-cliff.sh b/scripts/install-git-cliff.sh index 6a60058..5931c58 100755 --- a/scripts/install-git-cliff.sh +++ b/scripts/install-git-cliff.sh @@ -7,7 +7,11 @@ set -euo pipefail REPO="orhun/git-cliff" ARCH_OS="x86_64-unknown-linux-gnu" INSTALL_DIR="/usr/local/bin" -VERSION="${1:-latest}" +if [[ -z "${1:-}" ]]; then + VERSION="latest" +else + VERSION="$1" +fi need() { command -v "$1" >/dev/null || { echo "$1 is missing"; exit 1; }; } need curl; need tar; need grep; need sed; need awk; need jq