jpdillingham/Utility.CommandLine.Arguments

Improper value propagation when a boolean flag is followed by an operand

jpdillingham opened this issue · 0 comments

        [Argument('d', "duplicates")]
        private static bool AllowDuplicates { get; set; }

-a text

Results in an ArgumentException at runtime. The Parse() method correctly treats -a text as an argument pair because it is agnostic about the type of a, however when propagating the argument dictionary to properties the code should check the type and split this pair into a boolean and an operand.