Skip to content

Commit

Permalink
feature: reload all apps after connection to pm2 plus
Browse files Browse the repository at this point in the history
  • Loading branch information
wallet77 committed Jul 10, 2018
1 parent 68e87b3 commit 35a1ed2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/API/PM2/PM2IO.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ module.exports = function(CLI) {
var promptly = require('promptly');
printMotd();

const self = this

promptly.confirm(chalk.bold('Do you have a pm2.io account? (y/n)'), (err, answer) => {

if (answer == true) {
Expand All @@ -118,14 +120,16 @@ module.exports = function(CLI) {
}

Modularizer.installMultipleModules(modules, () => {
console.log(chalk.bold.green('[+] Exiting now.'))
self.reload('all')
setTimeout(function() {
console.log(chalk.bold.green('[+] Exiting now.'))
process.exit(cst.SUCCESS_EXIT);
}, 100);
});
} else {
console.log(chalk.bold.green('[+] Exiting now.'))
self.reload('all')
setTimeout(function() {
console.log(chalk.bold.green('[+] Exiting now.'))
process.exit(cst.SUCCESS_EXIT);
}, 100);
}
Expand Down

0 comments on commit 35a1ed2

Please sign in to comment.