mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 18:00:18 +01:00
Improve logging at build-time (#18780)
* Improve logging at build-time * Fix lint
This commit is contained in:
parent
82a64195a2
commit
086b7dade5
@ -1110,6 +1110,11 @@ async function createBundle(buildConfiguration, { reloadOnChange }) {
|
|||||||
logError(error);
|
logError(error);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
});
|
});
|
||||||
|
pipeline.on('error', (error) => {
|
||||||
|
console.error('Pipeline failed! See details below.');
|
||||||
|
logError(error);
|
||||||
|
process.exit(1);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
// trigger build pipeline instrumentations
|
// trigger build pipeline instrumentations
|
||||||
events.emit('configurePipeline', { pipeline, bundleStream });
|
events.emit('configurePipeline', { pipeline, bundleStream });
|
||||||
|
@ -80,12 +80,9 @@ function runInChildProcess(
|
|||||||
);
|
);
|
||||||
|
|
||||||
// forward logs to main process
|
// forward logs to main process
|
||||||
// skip the first stdout event (announcing the process command)
|
|
||||||
childProcess.stdout.once('data', () => {
|
|
||||||
childProcess.stdout.on('data', (data) =>
|
childProcess.stdout.on('data', (data) =>
|
||||||
process.stdout.write(`${taskName}: ${data}`),
|
process.stdout.write(`${taskName}: ${data}`),
|
||||||
);
|
);
|
||||||
});
|
|
||||||
|
|
||||||
childProcess.stderr.on('data', (data) =>
|
childProcess.stderr.on('data', (data) =>
|
||||||
process.stderr.write(`${taskName}: ${data}`),
|
process.stderr.write(`${taskName}: ${data}`),
|
||||||
|
Loading…
Reference in New Issue
Block a user