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
You can use allowUnknownOption() which does just what you want, but be warned there is not a convenient way to get the unrecognised options. See example and discussion in #802.
An alternative pattern which might make sense if the options are for another command is to use -- to stop the option processing (which effectively turns the following options into arguments). I use this pattern a bit, like when passing options to an npm run script which are intended for the script and not for npm.
e.g.
program
.command("up [args...]")
.action((args) => {
console.log(args);
});
I am looking for a way to disable option validation on a per command basis?
Then, when calling command, I dont want commander to throw error with invalid options
When calling
up
I receive messageThe text was updated successfully, but these errors were encountered: