From 4df5b37d8b7afae8e9872e923e3a00096502a4f4 Mon Sep 17 00:00:00 2001 From: Unitech Date: Thu, 15 Sep 2016 12:25:15 +0200 Subject: [PATCH] (pm2-dev) force no interaction in dev mode --- lib/DevCli.js | 4 ++-- lib/Interactor/InteractorDaemonizer.js | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/DevCli.js b/lib/DevCli.js index 29e4eddac..50092ecea 100644 --- a/lib/DevCli.js +++ b/lib/DevCli.js @@ -1,6 +1,8 @@ 'use strict'; +process.env.PM2_NO_INTERACTION = 'true'; + var commander = require('commander'); var debug = require('debug')('pm2:cli'); @@ -17,8 +19,6 @@ var fmt = require('./tools/fmt.js'); var exec = require('child_process').exec; var os = require('os'); -//process.env.PM2_SILENT = 'true'; - commander.version(pkg.version) .usage('[cmd] app'); diff --git a/lib/Interactor/InteractorDaemonizer.js b/lib/Interactor/InteractorDaemonizer.js index 4a0834bce..abe46460e 100644 --- a/lib/Interactor/InteractorDaemonizer.js +++ b/lib/Interactor/InteractorDaemonizer.js @@ -472,6 +472,7 @@ InteractorDaemonizer.launchAndInteract = function(conf, opts, cb) { */ InteractorDaemonizer.getInteractInfo = function(conf, cb) { debug('Getting interaction info'); + if (process.env.PM2_NO_INTERACTION) return; InteractorDaemonizer.ping(conf, function(online) { if (!online) { return cb(new Error('Interactor is offline'));