Skip to content
Myr

fixed ordering again

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

authored by TJ Holowaychuk · committed by TJ Holowaychuk · parent 6ccb639 · Browse files · 2 files+7 added−3 removed
This commit

State

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

Diff stats

2 files+7 added−3 removed

  • other:+7 added−3 removed

2 files+7 added−3 removed

modified:examples/deploy+2 added-1 removed
28 unmodified lines
29 .action(function(cmd, options){30 console.log('exec "%s" using %s mode', cmd, options.exec_mode);31 }).on('--help', function() {32 console.log(' Examples:');33 console.log('');33 console.log();34 console.log(' $ deploy exec sequential');35 console.log(' $ deploy exec async');36 console.log();37 });3839program40 .command('*')
5 unmodified lines
modified:lib/commander.js+5 added-2 removed
504 unmodified lines
505 // arg506 args.push(arg);507 }508 509 return {args: args, unknown: unknownOptions};509 return { args: args, unknown: unknownOptions };510};511512/**513 * Argument `name` is missing.
93 unmodified lines
607 return arg.required608 ? '<' + arg.name + '>'609 : '[' + arg.name + ']';610 });611612 var usage = '[options'613 + (this.commands.length ? '] [command' : '')614 + ']'615 + (this.args.length ? ' ' + args : '');616 if (0 == arguments.length) return this._usage || usage;617 this._usage = str;618619 return this;620};621622/**
46 unmodified lines
669 return arg.required670 ? '<' + arg.name + '>'671 : '[' + arg.name + ']';672 }).join(' ');673674 return cmd.name 675 + (cmd.options.length 676 ? ' [options]'677 : '') + ' ' + args
303 unmodified lines
981function outputHelpIfNecessary(cmd, options) {982 options = options || [];983 for (var i = 0; i < options.length; i++) {984 if (options[i] == '--help' || options[i] == '-h') {982 cmd.emit('--help');985 process.stdout.write(cmd.helpInformation());986 cmd.emit('--help');987 process.exit(0);988 }989 }990}