Skip to content
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

[bug] Bud returns "0" exit code when the build errors #1698

Closed
retlehs opened this issue Sep 22, 2022 · 2 comments
Closed

[bug] Bud returns "0" exit code when the build errors #1698

retlehs opened this issue Sep 22, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@retlehs
Copy link
Member

retlehs commented Sep 22, 2022

Describe the issue

The Bud process does not return the proper exit code when an error occurs

Expected Behavior

The process should return an exit status that isn't 0

This is critical for app deploys to fail as expected when a build doesn't complete. If a build fails but the deploy still continues, then the app can be deployed and immediately break

(Props to @joshuafredrickson for raising this on the #bud channel in the Roots Discord server)

Actual Behavior

The process returns with an exit status of 0

Steps To Reproduce

  1. yarn add @roots/bud-eslint @roots/eslint-config --dev
  2. Drop a .eslintrc.cjs in the project
  3. Modify app.js to produce an error

Example .eslintrc.cjs:

module.exports = {
  root: true,
  extends: ['eslint:recommended'],
  rules: {},
}

Example app.js:

var test = 'test';

Example simple test.sh script to return the code:

yarn build
echo $?

version

At least 6.3.5 and 6.4.1 are affected

@retlehs retlehs added the bug Something isn't working label Sep 22, 2022
kodiakhq bot pushed a commit that referenced this issue Sep 23, 2022
- throw hands on bad compilations
- throw hands on bad configs

still takes the peaceful route when `bud.isDevelopment`

refers:

- #1698 

## Type of change

**PATCH: backwards compatible change**



This PR includes breaking changes to the following core packages:

- none

This PR includes breaking changes to the follow extensions:

- none

## Dependencies

### Adds

- none

### Removes

- none
@kellymears
Copy link
Member

This should be fixed in v6.4.2 by d9b606e

@LucasDemea
Copy link

LucasDemea commented Feb 9, 2023

I still get a 0 error code when the build should fail with bud 6.6.9:
image
EDIT: Updating to 6.7.0 fixed it for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants