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 evidenced in lerna/lerna#2315, when arguments are passed after -- with the default parserConfiguration (append them to argv._), yargs@14.2.0 causes an incorrect coerce("") call on a command's positional argument, as well as re-parsing any flags (which fails when strict() is enabled).
It also causes the valid --loglevel option in the example above to fail, once the coerce() method is modfied to ensure that the parameter is in fact non-empty first (or if it's an identity function stuff => stuff, or removed entirely). So that's fun.
The current workaround is to enable populate-- in yargs-parser:
.parserConfiguration({"populate--": true,})
This seems sub-optimal.
The text was updated successfully, but these errors were encountered:
As evidenced in lerna/lerna#2315, when arguments are passed after
--
with the defaultparserConfiguration
(append them toargv._
),yargs@14.2.0
causes an incorrectcoerce("")
call on a command's positional argument, as well as re-parsing any flags (which fails whenstrict()
is enabled).It also causes the valid
--loglevel
option in the example above to fail, once thecoerce()
method is modfied to ensure that the parameter is in fact non-empty first (or if it's an identity functionstuff => stuff
, or removed entirely). So that's fun.The current workaround is to enable
populate--
in yargs-parser:This seems sub-optimal.
The text was updated successfully, but these errors were encountered: