Permalink
Browse files

fix wrong check for command list

command_list never would be falsy
  • Loading branch information...
1 parent e1aa65a commit 494f44eaaceaab34d6cca38065ef621e99fe945e @kosmotaur committed Sep 17, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 cli.js
View
2 cli.js
@@ -586,7 +586,7 @@ cli.getUsage = function () {
return truncated;
};
- usage = usage || cli.app + ' [OPTIONS]' + (command_list ? ' <command>' : '') + ' [ARGS]';
+ usage = usage || cli.app + ' [OPTIONS]' + (command_list.length ? ' <command>' : '') + ' [ARGS]';
console.error('\x1b[1mUsage\x1b[0m:\n ' + usage);
console.error('\n\x1b[1mOptions\x1b[0m: ');
for (opt in opt_list) {

0 comments on commit 494f44e

Please sign in to comment.