Skip to content

Commit

Permalink
[api][fix] updated app create command and allowed arg curring to set …
Browse files Browse the repository at this point in the history
…target to anything but the callback or null if nothing is provided
  • Loading branch information
blakmatrix committed Sep 18, 2012
1 parent 67a8518 commit d3b9a59
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/jitsu/commands/apps.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ apps.deploy.usage = [
];

//
// ### function list (callback)
// ### function create (callback)
// #### @target {string|Object} **optional** Name of the application to create
// #### @callback {function} Continuation to pass control to when complete.
// Creates an application for the package.json in the current directory
Expand All @@ -227,10 +227,12 @@ apps.deploy.usage = [
apps.create = function (target, callback) {

//
// Allows arbitrary amount of arguments to deploy
// Allows arbitrary amount of arguments
//
if(arguments.length) {
callback = utile.args(arguments).callback;
args = utile.args(arguments);
callback = args.callback;
target = args[0] || null;
}

var dir = process.cwd();
Expand Down

0 comments on commit d3b9a59

Please sign in to comment.