fix: skip following argument when current argument is --app
This commit is contained in:
1 parent
e107c19dbf
commit
9272e40178
1 file changed
+3
-1
@@ -35,10 +35,12 @@ source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
|||||||
|
|
||||||
parse_args "$@"
|
parse_args "$@"
|
||||||
args=("$@")
|
args=("$@")
|
||||||
|
skip_arg=false
|
||||||
if [[ "${args[0]}" =~ ^--.* ]]; then
|
if [[ "${args[0]}" =~ ^--.* ]]; then
|
||||||
for arg in "$@"; do
|
for arg in "$@"; do
|
||||||
|
$skip_arg && skip_arg=false && continue
|
||||||
if [[ "$arg" == "--app" ]]; then
|
if [[ "$arg" == "--app" ]]; then
|
||||||
shift 2
|
shift 2 && skip_arg=true
|
||||||
elif [[ "$arg" =~ ^--.* ]]; then
|
elif [[ "$arg" =~ ^--.* ]]; then
|
||||||
shift 1
|
shift 1
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in new issue
Block a user