From 0ad1573aef94c5e9d1f94d4d4f14026982cd8990 Mon Sep 17 00:00:00 2001 From: Tw93 Date: Wed, 31 Dec 2025 11:57:13 +0800 Subject: [PATCH] fix: Ensure `set --` correctly clears positional parameters when no arguments are collected. --- install.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index f770f77..b4c90fb 100755 --- a/install.sh +++ b/install.sh @@ -266,7 +266,11 @@ parse_args() { ;; esac done - set -- "${args[@]}" + if [[ ${#args[@]} -gt 0 ]]; then + set -- "${args[@]}" + else + set -- + fi while [[ $# -gt 0 ]]; do case $1 in