Skip to content

Commit

Permalink
Remove ssh-pass lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
arunoda committed Apr 26, 2015
1 parent 607dc40 commit ee4b412
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 28 deletions.
16 changes: 1 addition & 15 deletions bin/mup
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,7 @@ if(action == 'init') {
var cwd = path.resolve('.');
//read config and validate it
var config = Config.read();

if(config._passwordExists) {
//check for sshpass
helpers.checkSshPassExists(function(exists) {
if(exists) {
runActions(config, cwd);
} else {
var errorMessage = "sshpass required for password based authentication: refer http://git.io/_vHbvQ";
console.error(errorMessage.bold.red);
process.exit(1);
}
});
} else {
runActions(config, cwd);
}
runActions(config, cwd);
}


Expand Down
3 changes: 0 additions & 3 deletions lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ exports.read = function() {

if(server.pem) {
server.pem = rewriteHome(server.pem);
} else {
//hint mup bin script to check whether sshpass installed or not
mupJson._passwordExists = true;
}

server.env = server.env || {};
Expand Down
10 changes: 0 additions & 10 deletions lib/helpers.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
var exec = require('child_process').exec;

exports.checkSshPassExists = function(callback) {
exec('sshpass -V', function(err, stdout, stderr) {
if(err) {
callback(false);
} else {
callback(true);
}
});
};

exports.printHelp = function() {
console.error('\nValid Actions');
console.error('-------------');
Expand Down

0 comments on commit ee4b412

Please sign in to comment.