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
I expect {noReload: true} but I get {noReload: false, reload: false}
If I run it without args, like
node script.js
I expect {noReload: false} and I do get {noReload: false} but note how I do not see {reload: true}.
Is there a way to disable the special handling? At the very least, I think the last case should produce {reload: true} so I can get the proper flag value. Otherwise, I have no way to act on the user input.
This seems to be a change introduced by a recent upgrade to yargs.
The text was updated successfully, but these errors were encountered:
@kumar303 most of these clever parsing tricks can be turned off in configuration; I added this flexibility to the parsing engine, because different folks have different expectations regarding these edge-cases:
I think what I described above is still a bug. In the case where --no-reload is not given on the command line, argv should contain reload: true, otherwise you have to do an awkard undefined vs false check to figure it out. I also don't understand why you get noReload: false for boolean negation when --no-reload is on the command line. It seems like that should still be set to true.
It looks like a flag prefixed by
no-
has some special handling. I find this behavior unexpected. I made ascript.js
like this:When I run:
I expect
{noReload: true}
but I get{noReload: false, reload: false}
If I run it without args, like
I expect
{noReload: false}
and I do get{noReload: false}
but note how I do not see{reload: true}
.Is there a way to disable the special handling? At the very least, I think the last case should produce
{reload: true}
so I can get the proper flag value. Otherwise, I have no way to act on the user input.This seems to be a change introduced by a recent upgrade to yargs.
The text was updated successfully, but these errors were encountered: