propagate env

This commit is contained in:
Michael Bradley, Jr 2018-07-19 20:47:11 -05:00 committed by Iuri Matias
parent dcff2c0cb2
commit 2820d24f1e
3 changed files with 3 additions and 0 deletions

View File

@ -14,6 +14,7 @@ class ProcessLauncher {
* @return {ProcessLauncher} The ProcessLauncher instance
*/
constructor(options) {
this.env = options.env;
this.name = path.basename(options.modulePath);
this.process = child_process.fork(options.modulePath);
this.logger = options.logger;

View File

@ -21,6 +21,7 @@ class ProcessWrapper {
*/
constructor(_options) {
this.interceptLogs();
this.env = _options ? _options.env : 'development';
this.events = new Events();
this.pingParent();

View File

@ -99,6 +99,7 @@ class Pipeline {
function runWebpack(next) {
let built = false;
const webpackProcess = new ProcessLauncher({
env: self.env,
modulePath: utils.joinPath(__dirname, 'webpackProcess.js'),
logger: self.logger,
events: self.events,