mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-24 04:07:16 +00:00
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.
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user