dictation-toolbox / dragonfly

Speech recognition framework allowing powerful Python-based scripting and extension of Dragon NaturallySpeaking (DNS), Windows Speech Recognition (WSR), Kaldi and CMU Pocket Sphinx
GNU Lesser General Public License v3.0
383 stars 75 forks source link

Command-line interface bug with patterns #357

Closed drmfinlay closed 3 years ago

drmfinlay commented 3 years ago

The command-line interface load and test commands are both documented to take zero or more command module file paths. However, this rule is broken if a glob pattern is specified that matches no files, in which case the program exits early with an error. The following commands should both have the same behaviour run in an empty directory:

python -m dragonfly test
python -m dragonfly test _*.py
drmfinlay commented 3 years ago

There is a bug here, but the above is not quite right. I think the correct solution is to treat the string as a normal filename if the pattern matches no files.