mirror of
https://github.com/Unitech/pm2.git
synced 2025-12-08 20:35:53 +00:00
verify if 3rd module has not failed
This commit is contained in:
parent
5aa7dcec07
commit
2103ad38c0
@ -235,8 +235,10 @@ function installLangModule(module_name, cb) {
|
||||
cwd : node_module_path
|
||||
});
|
||||
|
||||
install_instance.on('close', function done() {
|
||||
cb(null);
|
||||
install_instance.on('close', function(code) {
|
||||
if (code > 0)
|
||||
return cb(new Error('Module install failed'));
|
||||
return cb(null);
|
||||
});
|
||||
|
||||
install_instance.on('error', function (err) {
|
||||
@ -337,8 +339,13 @@ Modularizer.install = function(CLI, module_name, opts, cb) {
|
||||
var canonic_module_name = Utility.getCanonicModuleName(module_name);
|
||||
|
||||
if (module_name == 'v8-profiler' || module_name == 'profiler') {
|
||||
installLangModule('v8-profiler', function(e) {
|
||||
Common.printOut(cst.PREFIX_MSG + chalk.bold.green('V8 profiling enabled'));
|
||||
installLangModule('v8-pasdrofiler', function(err) {
|
||||
if (err) {
|
||||
Common.printError(cst.PREFIX_MSG_MOD_ERR + chalk.bold.green('Profling installation has FAILED (checkout previous logs)'));
|
||||
return cb(err);
|
||||
}
|
||||
|
||||
Common.printOut(cst.PREFIX_MSG + chalk.bold.green('V8 profiling ENABLED'));
|
||||
return cb();
|
||||
});
|
||||
return false;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user