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
Quick answer: if any action handler is async, use .parseAsync().
(It is expected .parse() will sometimes work, with some versions of node, sometimes depending on what else your program is doing or how long it takes. Sometimes.)
Expected Behavior
According to https://github.com/tj/commander.js/blob/master/Readme.md#action-handler,
.parseAsync()
should be used forasync
action handlers.Actual Behavior
If a subcommand uses an
async
action handler,program.parse()
also works.Is this expected behavior? Since both
.parse()
and.parseAsync()
work in this case, which variant is recommended?The text was updated successfully, but these errors were encountered: