Skip to content

Commit

Permalink
Merge pull request #452 from nodejitsu/no-pass
Browse files Browse the repository at this point in the history
[fix] Login should be checked at startup
  • Loading branch information
mmalecki committed Jul 16, 2013
2 parents b4afd78 + 4832b63 commit a4c1a34
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 a4c1a34

Please sign in to comment.