mirror of
https://github.com/zhigang1992/create-react-app.git
synced 2026-04-24 05:05:53 +08:00
Make scripts crash on unhandled rejections (#1819)
* Makes end-to-end testing crash on unhandled rejections * Comment fix
This commit is contained in:
7
packages/react-scripts/scripts/eject.js
vendored
7
packages/react-scripts/scripts/eject.js
vendored
@@ -9,6 +9,13 @@
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
// Makes the script crash on unhandled rejections instead of silently
|
||||
// ignoring them. In the future, promise rejections that are not handled will
|
||||
// terminate the Node.js process with a non-zero exit code.
|
||||
process.on('unhandledRejection', err => {
|
||||
throw err;
|
||||
});
|
||||
|
||||
const fs = require('fs-extra');
|
||||
const path = require('path');
|
||||
const spawnSync = require('cross-spawn').sync;
|
||||
|
||||
Reference in New Issue
Block a user