Open ThawTunZan opened 4 months ago
Thank you for bringing this to our attention. We are able to reproduce the bug as shown.
In our investigation, it came to light that our command parser handles option flag arguments even without a trailing whitespace. This means
$ sell -noranges -q1
$ sell -n oranges -q 1
are parsed no differently. Values "oranges" and "1" are assigned to options -n
and -q
respectively in both commands.
The behaviour you're witnessing is when on top of this, arguments themselves are intended to contain a whitespace. Then something like
$ sell -noranges anges -q1
$ sell -n oranges anges -q 1
would be parsed differently. Value "oranges" is assigned to the -n
in the first command while "oranges anges" is assigned to the -n
in the second command. That is why "oranges" get sold and not "oranges anges" as intended.
We recognize this as problematic behaviour users can encounter by mistake, and are of the opinion that this is of Severity.Medium
for the following reasons:
-n
flag of sell
is materially affected (since that is the only one configured to take arguments with whitespaces).sell
in no way renders our product "almost unusable for most users" as is the criteria for a Severity.High
.
Team chose [severity.Medium
]
Originally [severity.High
]
Reason for disagreement: [replace this with your explanation]
Can have a wrong user input and the program will not identify it.
This could be a problem because if the user had a typo and wanted to add let's say oranges anges as an item but the program identifies it as oranges instead and sells the wrong one as seen below