File tree 2 files changed +17
-5
lines changed
packages/react-scripts/scripts
2 files changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,11 @@ if (!checkRequiredFiles([paths.appHtml, paths.appIndexJs])) {
42
42
process . exit ( 1 ) ;
43
43
}
44
44
45
+ // Issue: https://github.com/facebookincubator/create-react-app/issues/1753
46
+ // The below lines are added to make sure that this process is
47
+ // exited when stdin is ended. The consequence of not doing this means
48
+ // that all watch processes will stay running despite the process that spawned
49
+ // them being closed.
45
50
process . stdin . on ( 'end' , function ( ) {
46
51
process . exit ( 0 ) ;
47
52
} ) ;
Original file line number Diff line number Diff line change @@ -23,8 +23,20 @@ const jest = require('jest');
23
23
const argv = process . argv . slice ( 2 ) ;
24
24
25
25
// Watch unless on CI or in coverage mode
26
+ // Exit process when stdin ends only when watch mode enabled
26
27
if ( ! process . env . CI && argv . indexOf ( '--coverage' ) < 0 ) {
27
28
argv . push ( '--watch' ) ;
29
+
30
+ // Issue: https://github.com/facebookincubator/create-react-app/issues/1753
31
+ // The below lines are added to make sure that this process is
32
+ // exited when stdin is ended. The consequence of not doing this means
33
+ // that all watch processes will stay running despite the process that spawned
34
+ // them being closed.
35
+
36
+ process . stdin . on ( 'end' , function ( ) {
37
+ process . exit ( 0 ) ;
38
+ } ) ;
39
+ process . stdin . resume ( ) ;
28
40
}
29
41
30
42
// @remove -on-eject-begin
@@ -44,8 +56,3 @@ argv.push(
44
56
) ;
45
57
// @remove -on-eject-end
46
58
jest . run ( argv ) ;
47
-
48
- process . stdin . on ( 'end' , function ( ) {
49
- process . exit ( 0 ) ;
50
- } ) ;
51
- process . stdin . resume ( ) ;
You can’t perform that action at this time.
0 commit comments