joyent/node-triton#7 "triton create" could better handle missing package argument

This commit is contained in:
Trent Mick 2015-09-03 10:18:35 -07:00
parent 804fe155b9
commit 19ede6e489

View File

@ -18,9 +18,8 @@ function do_create_instance(subcmd, opts, args, callback) {
if (opts.help) {
this.do_help('help', {}, [subcmd], callback);
return;
} else if (args.length < 1 || args.length > 2) {
return callback(new errors.UsageError(format(
'incorrect number of args (%d)', args.length)));
} else if (args.length !== 2) {
return callback(new errors.UsageError('incorrect number of args'));
}
var log = this.triton.log;
@ -206,7 +205,7 @@ do_create_instance.help = (
'Create a new instance.\n' +
'\n' +
'Usage:\n' +
' {{name}} create-instance [<options>] IMAGE [PACKAGE]\n' +
' {{name}} create-instance [<options>] IMAGE PACKAGE\n' +
'\n' +
'{{options}}'
/* END JSSTYLED */