Skip to content
This repository has been archived by the owner on Jun 15, 2023. It is now read-only.

brunch build --production exits with status code 0 on error #1447

Closed
izakp opened this issue Jul 14, 2016 · 0 comments
Closed

brunch build --production exits with status code 0 on error #1447

izakp opened this issue Jul 14, 2016 · 0 comments
Labels

Comments

@izakp
Copy link

izakp commented Jul 14, 2016

Description

When running brunch build --production and brunch throws an error compiling assets, it still exits with status code 0. This is highly unusual default behavior and confusing when brunch is automated as part of a CI build pipeline.

Expected behavior

If brunch errors it should exit with a non-zero status code, especially when building for production

Actual behavior

In this test case, I have explicitly deleted the installation of babel-preset-es2015 in node_modules

$ brunch build --production
14 Jul 16:12:21 - error: Compiling of web/static/js/app.js failed. Couldn't find preset "/Users/izakp/Code/test/babel-preset-es2015" relative to directory "web/static/js"
14 Jul 16:12:21 - error: Compiling of web/static/js/socket.js failed. Couldn't find preset "/Users/izakp/Code/test/babel-preset-es2015" relative to directory "web/static/js"
14 Jul 16:12:22 - info: compiled app.css into app.css, copied 4 in 1.3 sec

$ echo $?
0

Environment

  1. Brunch: 2.8.2
  2. Node: 6.2.0
  3. NPM: 3.8.9
  4. Operating system: OSX 10.11.3 and Ubuntu 14.4

Using default configuration

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

No branches or pull requests

2 participants