Closed aksharpatel47 closed 3 years ago
https://github.com/python/cpython/blob/3.9/Lib/argparse.py#L2564 there is nothing of such kind in original.
Did you searched how they solve this issue?
Hi @puzrin. I see they don't handle it in the original library too. To accomplish this without changing anything in this project the ArgumentParser can be extended and the error method overridden.
Feel free to close this issue and the pr if you think it is outside the scope of this library. Thanks for your time.
argparse version: 2.0.1
Reproducible Code:
index.js
Current Output
The process exists after pushing the above message on the console.
Expected Output
Looking at the source code, in the error function implementation in argparse.js, the exit_on_error flag needs to be checked before running the exit method. https://github.com/nodeca/argparse/blob/174bd80df5b45519475b9e2f611090b5b453b243/argparse.js#L3641-L3658