Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make build exit with error code when interrupted (facebook#1496)
* Make build exit with error code when interrupted This addresses issue facebook#1493. Current behavior is that `npm run build` exits code 0 without creating a bundle when interrupted. This change makes the build script catch catchable interruptions and exit with the appropriate error code. * Better error messages for kill signals * Don't catch SIGINT Ctrl+C should exit silently, and already produces a non-zero exit code when sent to the console while `npm run build` is running. Exit code 0 is produced if SIGINT is sent directly to the `node build.js` process, but this is unlikely to happen. A SIGINT handler in `build.js` will also be triggered by Ctrl+C in the console, potentially producing unnecessary noise. * Style fix * No changes needed to build.js Problem is coming from the parent process, `react-scripts` * Make react-scripts script handle signals * Clarify context
- Loading branch information