From 6b6571e650bba44c0037df110ae113dc5291ef7a Mon Sep 17 00:00:00 2001 From: Pulse Monitor Date: Thu, 11 Sep 2025 15:20:39 +0000 Subject: [PATCH] fix: handle missing argument for --main option Fixed 'unbound variable' error when using --main without additional arguments. Added check for argument count before accessing $2. --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index d0226ce5a..c7a3bb9ee 100755 --- a/install.sh +++ b/install.sh @@ -2254,7 +2254,7 @@ while [[ $# -gt 0 ]]; do --main|--source|--from-source|--branch) BUILD_FROM_SOURCE=true # Optional: specify branch - if [[ -n "$2" ]] && [[ ! "$2" =~ ^-- ]]; then + if [[ $# -gt 1 ]] && [[ -n "$2" ]] && [[ ! "$2" =~ ^-- ]]; then SOURCE_BRANCH="$2" shift 2 else