Skip to content

Commit

Permalink
Merge pull request #386 from nodejitsu/clouds
Browse files Browse the repository at this point in the history
v0.12.0
  • Loading branch information
indexzero committed Feb 12, 2013
2 parents 5c023b2 + 7c32ea0 commit 1960805
Show file tree
Hide file tree
Showing 26 changed files with 1,075 additions and 444 deletions.
14 changes: 11 additions & 3 deletions lib/jitsu.js
Expand Up @@ -214,6 +214,14 @@ jitsu.exec = function (command, callback) {
command[1] = 'app';
}

// Allow `jitsu host` as a shortcut for `jitsu config set remoteHost`
if (command[0] === 'host' && command.length === 2) {
command[3] = command[1];
command[0] = 'config';
command[1] = 'set';
command[2] = 'remoteHost';
}

jitsu.log.info('Executing command ' + command.join(' ').magenta);
jitsu.router.dispatch('on', command.join(' '), jitsu.log, function (err, shallow) {
if (err) {
Expand Down Expand Up @@ -355,10 +363,10 @@ jitsu.showError = function (command, err, shallow, skip) {
}
else {
if (err.stack && !shallow) {
if(err.message && err.message === 'socket hang up'){
if (err.code){
if (err.message && err.message === 'socket hang up') {
if (err.code) {
jitsu.log.info('');
if (err.code === 'ECONNRESET'){
if (err.code === 'ECONNRESET') {
jitsu.log.info(
'jitsu\'s client request timed out before the server ' +
'could respond. Please increase your client timeout' +
Expand Down
1 change: 1 addition & 0 deletions lib/jitsu/alias.js
Expand Up @@ -10,6 +10,7 @@ var jitsu = require('../jitsu');
//
// Alias the appropriate commands for simplier CLI usage
//
jitsu.alias('cloud', { resource: 'apps', command: 'cloud' });
jitsu.alias('destroy', { resource: 'apps', command: 'destroy' });
jitsu.alias('deploy', { resource: 'apps', command: 'deploy' });
jitsu.alias('publish', { resource: 'apps', command: 'deploy' });
Expand Down

0 comments on commit 1960805

Please sign in to comment.