Skip to content

Commit

Permalink
[fix] Login should be checked at startup
Browse files Browse the repository at this point in the history
  • Loading branch information
mmalecki committed Jul 16, 2013
1 parent b4afd78 commit 4832b63
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions lib/jitsu/commands/apps.js
Expand Up @@ -110,23 +110,6 @@ apps.deploy = function (callback) {
cloud.datacenter = jitsu.argv['datacenter'];
}

function promptLogin () {
jitsu.log.warn("No user is logged in");
jitsu.log.warn("Please authenticate");
jitsu.commands.users.login(function (err) {
return err
? callback(err)
: jitsu.commands.apps.deploy(callback);
});
}

//
// If not logged in require the user to authenticate before deploying
//
if (!jitsu.config.get('username') && !jitsu.config.get('password')) {
return promptLogin();
}

function startApp(err, existing) {
if (err) {
jitsu.log.error('Error creating snapshot for app ' + pkg.name.magenta);
Expand Down

0 comments on commit 4832b63

Please sign in to comment.