mirror of
https://github.com/tw93/Mole.git
synced 2026-02-04 12:06:45 +00:00
fix: Ensure set -- correctly clears positional parameters when no arguments are collected.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user