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
exports.command='init [target]';exports.desc='Create the config files. (or update if exists)';exports.builder=functionbuilder(yargs){returnyargs.default('target','./').demandCommand(0,1,'no way to show this','Too many arguments.').strict();};
Things should start working for you. I can see the argument for making demand also be applied to arguments that are simply defaulted; it might be worth joining the conversation here #742, where we're discussing API improvements for version 7.x of yargs.
main.js:
commands/init.js:
node ./main.js init /tmp/xxx
:The text was updated successfully, but these errors were encountered: