Skip to content

Commit

Permalink
Fixed double 'usage' in sub-command help
Browse files Browse the repository at this point in the history
  • Loading branch information
shkuropat committed May 15, 2012
1 parent bda6d2b commit 630e6de
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/help/formatter.js
Expand Up @@ -260,7 +260,10 @@ HelpFormatter.prototype._joinParts = function (partStrings) {
};

HelpFormatter.prototype._formatUsage = function (usage, actions, groups, prefix) {
prefix = prefix || 'usage: ';
if (!prefix && !_.isString(prefix)) {
prefix = 'usage: ';
}

actions = actions || [];
groups = groups || [];

Expand Down Expand Up @@ -674,7 +677,7 @@ HelpFormatter.prototype._expandHelp = function (action) {

for (actionProperty in action) {
if (action.hasOwnProperty(actionProperty)) {
actionValue = params[actionProperty];
actionValue = action[actionProperty];

if (actionValue !== $$.SUPPRESS) {
params[actionProperty] = actionValue;
Expand Down

0 comments on commit 630e6de

Please sign in to comment.