All CLI number options are incorrectly parsed.
Closed this issue · 1 comments
fuweichin commented
This problem may be caused by upgrading of dependency "commander" which now passes multiple parameters to custom parse function.
Unlike parseFloat
which accepts only 1 parameter, parseInt
accepts second parameter radix
.
So use of global parseInt
as custom parse function is unsafe, a quick fix is to use a local parseInt function which will only accept 1 parameter.
index.js:12
function parseArgs() {
let parseInt = (s) => Number.parseInt(s);
//...
}
ralscha commented
Thanks a lot for the report. Released 3.1.0 with this fix