You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As far as I understand the documentation, these two APIs should work the same, but only option b2 is actually working, option b1 is simply ignored:
$ node index.js test --help
index.js test
Options:
--help Show help [boolean]
--version Show version number [boolean]
--b2 [boolean]
Using it results in an error:
$ node index.js test --b1
index.js test
Options:
--help Show help [boolean]
--version Show version number [boolean]
--b2 [boolean]
Unknown argument: b1
I found an inconsistent behavior of
.boolean(key)
and.option(key, { boolean: true })
.Here is an example:
As far as I understand the documentation, these two APIs should work the same, but only option b2 is actually working, option b1 is simply ignored:
Using it results in an error:
But it works in non-strict mode though:
It seems that the call to
self.describe
is the reason for the different behavior.yargs/lib/yargs.ts
Lines 843 to 844 in 0b519a4
The text was updated successfully, but these errors were encountered: