Skip to content
Myr

Make description optional and avoid printing "--someoption undefined" in help message.

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

authored by Peter Lyons · committed by Peter Lyons · parent df60805 · Browse files · 1 file+1 added−2 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−2 removed

  • other:+1 added−2 removed

1 file+1 added−2 removed

modified:lib/commander.js+1 added-2 removed
11/*!2 * commander3 * Copyright(c) 2011 TJ Holowaychuk <tj@vision-media.ca>4 * MIT Licensed
41 unmodified lines
46 this.bool = !~flags.indexOf('-no-');47 flags = flags.split(/[ ,|]+/);48 if (flags.length > 1 && !/^[[<]/.test(flags[1])) this.short = flags.shift();49 this.long = flags.shift();51 this.description = description;50 this.description = description || '';51}5253/**54 * Return option name.
971 unmodified lines