Skip to content

Commit

Permalink
[misc] show useful information when the app dont have cloud config
Browse files Browse the repository at this point in the history
  • Loading branch information
cronopio authored and indexzero committed Feb 12, 2013
1 parent b553230 commit b2fcc31
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/jitsu/commands/apps.js
Expand Up @@ -819,6 +819,11 @@ apps.cloud = function (name, provider, datacenter) {
// Print the cloud information for the app and respond.
//
function viewCloud(app) {
if (!app.config || !app.config.cloud) {
jitsu.log.error('Error: The app ' + app.name.magenta + ' don\'t have any cloud config.');
jitsu.log.error('You need deploy your app before get any cloud config.');
return callback(new Error());
}
jitsu.log.info('Viewing cloud info for ' + name.magenta);
jitsu.inspect.putObject(app.config.cloud[0]);
callback(null, app);
Expand Down

0 comments on commit b2fcc31

Please sign in to comment.