app: fix error messages for not specified parameters in argparse
Argparse module stores unspecified parameter values as boolean true. It led to a problem, that a command line '--value' with 'value' defined as a number or a string, showed a strange error message: Expected number/string, got "true" Even though a user didn't pass any value. Now it shows 'nothing' instead of '"true"'. That is clearer. Follow up #4076
Showing
- src/lua/argparse.lua 14 additions, 13 deletionssrc/lua/argparse.lua
- test/app/argparse.result 2 additions, 2 deletionstest/app/argparse.result
- test/app/gh-4076-argparse-wrong-bool-handling.result 27 additions, 1 deletiontest/app/gh-4076-argparse-wrong-bool-handling.result
- test/app/gh-4076-argparse-wrong-bool-handling.test.lua 12 additions, 0 deletionstest/app/gh-4076-argparse-wrong-bool-handling.test.lua
Loading
Please register or sign in to comment