Skip to content

Commit

Permalink
Make description optional and avoid printing "--someoption undefined"…
Browse files Browse the repository at this point in the history
… in help message.
  • Loading branch information
focusaurus committed Jul 3, 2012
1 parent df60805 commit 10f5cb7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/commander.js
@@ -1,4 +1,3 @@

/*!
* commander
* Copyright(c) 2011 TJ Holowaychuk <tj@vision-media.ca>
Expand Down Expand Up @@ -48,7 +47,7 @@ function Option(flags, description) {
flags = flags.split(/[ ,|]+/);
if (flags.length > 1 && !/^[[<]/.test(flags[1])) this.short = flags.shift();
this.long = flags.shift();
this.description = description;
this.description = description || '';
}

/**
Expand Down

0 comments on commit 10f5cb7

Please sign in to comment.