-v option will not exec pm2 at all

This commit is contained in:
Unitech 2017-12-12 12:38:02 +01:00
parent dc8fe09b68
commit 93c18fcb02

View File

@ -17,11 +17,15 @@ var tabtab = require('../lib/completion.js');
// Early detection of silent to avoid printing motd
if (process.argv.indexOf('--silent') > -1 ||
process.argv.indexOf('-s') > -1 ||
process.argv.indexOf('-v') > -1) {
process.argv.indexOf('-s') > -1) {
process.env.PM2_DISCRETE_MODE = true;
}
if (process.argv.indexOf('-v') > -1) {
console.log(pkg.version);
process.exit(0);
}
var pm2 = new PM2();
commander.version(pkg.version)