-
-
Notifications
You must be signed in to change notification settings - Fork 590
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
webpack-cli@4 exits with 0 even when failing #1980
Comments
For maintainers only:
|
The build was broken but the error was silenced due to https://github.com/webpack/webpack/issues/11789
Thanks for the report I'm looking into it. |
I don't know where you're testing because it doesn't work anywhere for me. Here's a plain GitHub Action workflow where CI passes even if webpack fails: https://github.com/fregante/webpack-issue-11789/runs/1296100000?check_suite_focus=true name: CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- run: npm install webpack webpack-cli@4
- run: echo '.' > webpack.config.js
- run: npx webpack |
Just added a test case for the same in #1979 |
The tests in that PR pass while my repro code still shows the issue on both GitHub Actions and my computer. This means that the test effectively isn’t testing the same thing/environment. |
Here’s another workflow testing every major version of webpack-cli. Every version correctly fails except v4 https://github.com/fregante/webpack-issue-11789/runs/1297087059?check_suite_focus=true |
It's possible that #1971 fixed it just a couple of days ago but hasn't been pushed yet 🍰 |
can you try with the |
I tried but it's a monorepo, I don't know how to |
You can create a symlink with |
@fregante Can you create reproducible test repo, i think fixed in master |
@evilebottnawi it's https://github.com/fregante/webpack-issue-11789 The repro is in GitHub Actions, it's only 3 lines:
|
Just ran into this problem. Upgraded to |
Bug report
$ webpack
should exit with a non-0 code when it finds an error inwebpack.config.js
What is the current behavior?
$ webpack
exits with0
even if it throws a fatal error:If the current behavior is a bug, please provide the steps to reproduce.
Notice that
webpack
’s version is irrelevant.webpack-cli
is the problemWhat is the expected behavior?
webpack-cli@3
worked correctly, it exited with1
.Other relevant information:
webpack version: 4 or 5 (webpack version irrelevant)
webpack-cli version: 4.1.0
Node.js version: v13.8.0
Operating System: macOS 10.15.4
Additional tools:
The text was updated successfully, but these errors were encountered: