mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-12-29 14:56:36 +03:00
Don't fail when elm-optimize-level-2 prints warnings.
This commit is contained in:
parent
2b34ae971b
commit
3c668d83e3
@ -363,18 +363,16 @@ function elmOptimizeLevel2(outputPath, cwd) {
|
||||
});
|
||||
|
||||
subprocess.on("close", async (code) => {
|
||||
if (
|
||||
code === 0 &&
|
||||
commandOutput === "" &&
|
||||
(await fs.fileExists(optimizedOutputPath))
|
||||
) {
|
||||
if (code === 0) {
|
||||
await fs.copyFile(optimizedOutputPath, outputPath);
|
||||
resolve();
|
||||
} else {
|
||||
if (!buildError) {
|
||||
buildError = true;
|
||||
process.exitCode = 1;
|
||||
reject(commandOutput);
|
||||
reject(
|
||||
`I encountered an error when running elm-optimize-level-2:\n\n ${commandOutput}`
|
||||
);
|
||||
} else {
|
||||
// avoid unhandled error printing duplicate message, let process.exit in top loop take over
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user