1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 09:57:02 +01:00

Improve logging at build-time (#18780)

* Improve logging at build-time

* Fix lint
This commit is contained in:
Frederik Bolding 2023-04-26 08:33:36 +02:00 committed by GitHub
parent 82a64195a2
commit 086b7dade5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 6 deletions

View File

@ -1110,6 +1110,11 @@ async function createBundle(buildConfiguration, { reloadOnChange }) {
logError(error);
process.exit(1);
});
pipeline.on('error', (error) => {
console.error('Pipeline failed! See details below.');
logError(error);
process.exit(1);
});
}
// trigger build pipeline instrumentations
events.emit('configurePipeline', { pipeline, bundleStream });

View File

@ -80,12 +80,9 @@ function runInChildProcess(
);
// forward logs to main process
// skip the first stdout event (announcing the process command)
childProcess.stdout.once('data', () => {
childProcess.stdout.on('data', (data) =>
process.stdout.write(`${taskName}: ${data}`),
);
});
childProcess.stderr.on('data', (data) =>
process.stderr.write(`${taskName}: ${data}`),