diff --git a/lib/API/PM2/PM2IO.js b/lib/API/PM2/PM2IO.js index c4c424dee..698e9c067 100644 --- a/lib/API/PM2/PM2IO.js +++ b/lib/API/PM2/PM2IO.js @@ -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) { @@ -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); }