mirror of https://github.com/embarklabs/embark.git
Merge pull request #616 from embark-framework/bug_fix/tell-pipeline-exited
log error when pipeline dies
This commit is contained in:
commit
908b51bc97
|
@ -101,15 +101,25 @@ class Pipeline {
|
|||
// JS files
|
||||
async.waterfall([
|
||||
function runWebpack(next) {
|
||||
let built = false;
|
||||
const webpackProcess = new ProcessLauncher({
|
||||
modulePath: utils.joinPath(__dirname, 'webpackProcess.js'),
|
||||
logger: self.logger,
|
||||
events: self.events
|
||||
events: self.events,
|
||||
exitCallback: function (code) {
|
||||
if (!built) {
|
||||
return next(`File building of ${file.filename} exited with code ${code} before the process finished`);
|
||||
}
|
||||
if (code) {
|
||||
self.logger(__('File building process exited with code ', code));
|
||||
}
|
||||
}
|
||||
});
|
||||
webpackProcess.send({action: constants.pipeline.init, options: {}});
|
||||
webpackProcess.send({action: constants.pipeline.build, file, importsList});
|
||||
|
||||
webpackProcess.once('result', constants.pipeline.built, (msg) => {
|
||||
built = true;
|
||||
webpackProcess.kill();
|
||||
return next(msg.error);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue