Skip to content

Commit

Permalink
Do not print default for --no-
Browse files Browse the repository at this point in the history
  • Loading branch information
ntkme authored and roman-vanesyan committed Jan 6, 2018
1 parent ff712f1 commit f13ee18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Expand Up @@ -964,7 +964,7 @@ Command.prototype.optionHelp = function() {
// Append the help information
return this.options.map(function(option) {
return pad(option.flags, width) + ' ' + option.description
+ (option.defaultValue !== undefined ? ' (default: ' + option.defaultValue + ')' : '');
+ ((option.bool != false && option.defaultValue !== undefined) ? ' (default: ' + option.defaultValue + ')' : '');
}).concat([pad('-h, --help', width) + ' ' + 'output usage information'])
.join('\n');
};
Expand Down

0 comments on commit f13ee18

Please sign in to comment.