Skip to content
Myr

Merge pull request #209 from v0lkan/feature/minor-action-fix

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

if args is falsy, assume a default collection.

authored by TJ Holowaychuk · committed by TJ Holowaychuk · parents 89a6a92, 34abab6 · Browse files · 1 file+2 added−0 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+2 added−0 removed

  • other:+2 added−0 removed

1 file+2 added−0 removed

modified:index.js+2 added
213 unmodified lines
214Command.prototype.action = function(fn){215 var self = this;216 this.parent.on(this._name, function(args, unknown){217 // Parse any so-far unknown options218 args = args || [];219 unknown = unknown || [];220221 var parsed = self.parseOptions(unknown);222223 // Output help if necessary224 outputHelpIfNecessary(self, parsed.unknown);
630 unmodified lines