Opened 7 years ago

Last modified 7 years ago

#11642 new Bug Report - General

CommandLineParser cannot handle values being passed to boolean options

Reported by: Raymond Wagner Owned by: Raymond Wagner
Priority: trivial Milestone: unknown
Component: MythTV - General Version: Master Head
Severity: low Keywords:
Cc: Ticket locked: no


If an option/value pair is processed, split using a equals ('=') sign, and passed to a boolean option, the parser will attempt to reprocess the two arguments separately, and get caught in an infinite loop.

Change History (1)

comment:1 Changed 7 years ago by Raymond Wagner <rwagner@…>

In 168b8528f39ef8837884f93d8c26f3496868c642/mythtv:

Fix infinite reprocessing loop for booleans in command line parser.

This fixes the immediate issue, by allowing the parser loop to
distinguish between the two scenarios, and only attempt reprocessing if
it makes sense to.

Refs #11642

I'm leaving the ticket open, as we should not be reporting an error
prematurely when we're going to attempt reprocessing. We should probably
also accept various forms of "true" and "false" for booleans, rather
than accept no values.

Note: See TracTickets for help on using tickets.