Skip to content
This repository has been archived by the owner on Oct 13, 2022. It is now read-only.

Failed build script should not return exit code 0 #45

Closed
hexagon6 opened this issue Mar 10, 2018 · 3 comments
Closed

Failed build script should not return exit code 0 #45

hexagon6 opened this issue Mar 10, 2018 · 3 comments

Comments

@hexagon6
Copy link

When running the webpack build running npm run build in CI it should be possible to check for failure on the returned exit code.

Expected behaviour:

npm run build
# -> some build error happens
Error: Encountered errors while building app
    at /.../node_modules/sapper/cli.js:80:24
echo $?
127

What currently happens:

npm run build
# -> some build error happens
Error: Encountered errors while building app
    at /.../node_modules/sapper/cli.js:80:24
echo $?
0

This would allow detection of broken builds.

@hexagon6
Copy link
Author

To resolve this we might want to add the --bail option to webpack: webpack/webpack#708 (comment)

@hexagon6
Copy link
Author

Alternatively add the webpack-fail-plugin: https://github.com/teamdotjs/v2/pull/190/files

@Rich-Harris
Copy link
Member

I agree — this is an issue with Sapper itself though rather than this project template, so I'll close this in favour of sveltejs/sapper#208. Thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants