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 09ca65b commit e74f63dCopy full SHA for e74f63d
src/cli.ts
@@ -32,7 +32,14 @@ async function main() {
32
options[optionName] = optionValue
33
}
34
} else if (optionType === 'number') {
35
- options[optionName] = parseInt(optionValue)
+ const convertedToNumber = parseInt(optionValue)
36
+
37
+ if (Number.isFinite(convertedToNumber)) {
38
+ options[optionName] = convertedToNumber
39
+ } else {
40
+ //Do not convert to number if the value converted to a number is either positive or negative Infinity or NaN.
41
+ options[optionName] = optionValue
42
+ }
43
} else {
44
options[opt.slice(2)] = optionValue
45
0 commit comments