kiwix / kiwix-tools

Command line Kiwix tools: kiwix-serve, kiwix-manage, ...
https://download.kiwix.org/release/kiwix-tools/
GNU General Public License v3.0
428 stars 83 forks source link

kiwix-serve must exit with an error after reporting an unrecognized option #566

Closed veloman-yunkan closed 2 years ago

veloman-yunkan commented 2 years ago

kiwix-serve reports unrecognized options but otherwise ignores them. This can be a problem when an option is mistyped:

$ # The correct option name is --monitorLibrary with L capitalized
$ # Below command will NOT monitory the library 
$ kiwix-serve --port=8282 --library --monitorlibrary library.xml
.../kiwix-serve: unrecognized option '--monitorlibrary'
Loading the library from the following files:
    library.xml
The library was successfully loaded.
The Kiwix server is running and can be accessed in the local network at: http://localhost:8282/