diff --git a/lib/God.js b/lib/God.js index 1a8a3d13d..a369c4ec6 100644 --- a/lib/God.js +++ b/lib/God.js @@ -488,7 +488,7 @@ God.finalizeProcedure = function finalizeProcedure(proc) { var current_path = proc.pm2_env.cwd || path.dirname(proc.pm2_env.pm_exec_path); var proc_id = proc.pm2_env.pm_id; - proc.pm2_env.version = Utility.findPackageVersion(proc.pm2_env.pm_exec_path || proc.pm2_env.cwd); + proc.pm2_env.version = Utility.findPackageVersion(proc.pm2_env.pm_exec_path) || Utility.findPackageVersion(proc.pm2_env.cwd) || "N/A" if (proc.pm2_env.vizion_running === true) { debug('Vizion is already running for proc id: %d, skipping this round', proc_id); diff --git a/lib/Utility.js b/lib/Utility.js index 547ec9bf6..8d5aa7b30 100644 --- a/lib/Utility.js +++ b/lib/Utility.js @@ -24,7 +24,7 @@ var Utility = module.exports = { try { version = findPackageJson(fullpath).next().value.version } catch(e) { - version = 'N/A' + version = undefined } return version },