From d71542f5d2f5ec4b60544dbb13a19ffe4bf42d89 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Wed, 27 Sep 2023 16:06:22 -0500 Subject: [PATCH] fix: don't skip args if non run command using run --- src/viv/viv.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/viv/viv.py b/src/viv/viv.py index f77f81a..ea3933c 100755 --- a/src/viv/viv.py +++ b/src/viv/viv.py @@ -2142,12 +2142,13 @@ class Cli: cmd, parents=[self.parsers.get(k) for k in self.cmd_arg_group_map[cmd]], ) - if "--" in sys.argv: i = sys.argv.index("--") args = self.parser.parse_args(sys.argv[1:i]) args.rest = sys.argv[i + 1 :] - elif flag := list({"-s", "--script"} & set(sys.argv)): + elif {"r", "run"} & set(sys.argv[1:2]) and ( + flag := list({"-s", "--script"} & set(sys.argv)) + ): i = sys.argv.index(flag[0]) args = self.parser.parse_args(sys.argv[1 : i + 2]) args.rest = sys.argv[i + 2 :]