Skip to content
Myr

only bitch about required args

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Tj Holowaychuk · committed by Tj Holowaychuk · parent 3636e5e · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:lib/commander.js+1 added-1 removed
198 unmodified lines
199Command.prototype.action = function(fn){200 var self = this;201 this.parent.on(this.name, function(args){202 self.args.forEach(function(arg, i){203 if (null == args[i]) {203 if (arg.required && null == args[i]) {204 self.missingArgument(arg.name);205 }206 });207 fn.apply(this, args);
595 unmodified lines