cofyc / argparse

Command-line arguments parsing library.
MIT License
685 stars 124 forks source link

Exit status should not be 0 on error #2

Closed aburgh closed 10 years ago

aburgh commented 10 years ago

This project looks interesting, I look forward to using it in some projects. Thanks for your work.

When exiting due to a parsing error, argparse exits with status 0, but it should probably return EXIT_FAILURE (from stdlib.h) or EX_USAGE (from sysexits.h). If the user passes "-h", then 0 is correct, in my opinion.

cofyc commented 10 years ago

Thanks for you suggestion!