We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1a6dba5 commit ff1d2ceCopy full SHA for ff1d2ce
lib/command.js
@@ -1756,7 +1756,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
1756
1757
const negativeNumberArg = (arg) => {
1758
// return false if not a negative number
1759
- if (!/^-\d*\.?\d+(e[+-]?\d+)?$/.test(arg)) return false;
+ if (!/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(arg)) return false;
1760
// negative number is ok unless digit used as an option in command hierarchy
1761
return !this._getCommandAndAncestors().some((cmd) =>
1762
cmd.options
0 commit comments