Skip to content
This repository was archived by the owner on May 16, 2025. It is now read-only.

Ensure error is logged when Closure fails #163

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions src/closure-compiler-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -968,10 +968,12 @@ class ClosureCompilerPlugin {

compilerProcess.on('close', (exitCode) => {
if (stdErrData instanceof Error) {
this.reportErrors({
level: 'error',
description: stdErrData.message,
});
this.reportErrors(compilation, [
{
level: 'error',
description: stdErrData.message,
},
]);
reject();
return;
}
Expand Down Expand Up @@ -1007,6 +1009,13 @@ class ClosureCompilerPlugin {

this.reportErrors(compilation, errors);
// TODO(ChadKillingsworth) Figure out how to report the stats
} else if (exitCode > 0) {
this.reportErrors(compilation, [
{
level: 'error',
description: `Closure compiler exited with code ${exitCode}.`,
},
]);
}

if (exitCode > 0) {
Expand Down