From 7d64b705a3c148c1ca72123948818cf9662ac2fc Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Tue, 8 May 2018 09:52:06 -0400 Subject: [PATCH] touch ups --- lib/core/engine.js | 3 +++ lib/pipeline/pipeline.js | 8 ++------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/core/engine.js b/lib/core/engine.js index 40a2f7be7..7609a3a7d 100644 --- a/lib/core/engine.js +++ b/lib/core/engine.js @@ -182,6 +182,9 @@ class Engine { if (self.watch) { self.watch.restart(); // Necessary because changing a file while it is writing can stop it from being watched } + if (msg.error) { + return self.logger.error(msg.error); + } return self.events.emit('outputDone'); } diff --git a/lib/pipeline/pipeline.js b/lib/pipeline/pipeline.js index 9b7d064d2..d69e21b39 100644 --- a/lib/pipeline/pipeline.js +++ b/lib/pipeline/pipeline.js @@ -285,7 +285,6 @@ class Pipeline { webpack(webpackOptions).run((_err, _stats) => { if (_err) { - console.log('ERROS'); console.log(_err); } if (!detectErrors) { @@ -364,10 +363,8 @@ class Pipeline { } ], cb); } - } - process.on('message', (msg) => { if (msg.action === constants.pipeline.init) { pipeline = new Pipeline(msg.options); @@ -375,13 +372,12 @@ process.on('message', (msg) => { } if (msg.action === constants.pipeline.build) { - return pipeline.build(msg.abi, msg.contractsJSON, msg.path, (err, result) => { - process.send({result: constants.pipeline.built, error: err, data: result}); + return pipeline.build(msg.abi, msg.contractsJSON, msg.path, (err) => { + process.send({result: constants.pipeline.built, error: err}); }); } }); - process.on('exit', () => { process.exit(0); });