mirror of
https://github.com/tw93/Mole.git
synced 2026-02-04 13:16:47 +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
|
esac
|
||||||
done
|
done
|
||||||
set -- "${args[@]}"
|
if [[ ${#args[@]} -gt 0 ]]; then
|
||||||
|
set -- "${args[@]}"
|
||||||
|
else
|
||||||
|
set --
|
||||||
|
fi
|
||||||
|
|
||||||
while [[ $# -gt 0 ]]; do
|
while [[ $# -gt 0 ]]; do
|
||||||
case $1 in
|
case $1 in
|
||||||
|
|||||||
Reference in New Issue
Block a user