From d7bc303bd11cedc322eefbdaf35726feac1972d4 Mon Sep 17 00:00:00 2001 From: Cameron Marotti <39228422+Cyerunix@users.noreply.github.com> Date: Fri, 5 Jul 2024 22:20:48 -0400 Subject: [PATCH] Update parser.py --- pash_annotations/parser/parser.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pash_annotations/parser/parser.py b/pash_annotations/parser/parser.py index 0a177ad..1cc3a2e 100644 --- a/pash_annotations/parser/parser.py +++ b/pash_annotations/parser/parser.py @@ -26,6 +26,8 @@ def parse(command) -> CommandInvocationInitial: i = 1 while i < len(parsed_elements_list): potential_flag_or_option = parsed_elements_list[i] + if potential_flag_or_option == '': # empty string counts as an operand + break if potential_flag_or_option in set_of_all_flags: flag_name_as_string: str = dict_flag_to_primary_repr.get(potential_flag_or_option, potential_flag_or_option) flag: Flag = Flag(flag_name_as_string)