Skip to content

Commit 7e6d6cd

Browse files
Kelsey Leftwichianschmitz
Kelsey Leftwich
andauthoredFeb 19, 2020
Closes webpack dev server and exits process on "end" stdin (#7203)
Co-authored-by: Ian Schmitz <ianschmitz@gmail.com>
1 parent af926d5 commit 7e6d6cd

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
 

‎packages/react-scripts/scripts/start.js

+9
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,15 @@ checkBrowsers(paths.appPath, isInteractive)
164164
process.exit();
165165
});
166166
});
167+
168+
if (isInteractive || process.env.CI !== 'true') {
169+
// Gracefully exit when stdin ends
170+
process.stdin.on('end', function() {
171+
devServer.close();
172+
process.exit();
173+
});
174+
process.stdin.resume();
175+
}
167176
})
168177
.catch(err => {
169178
if (err && err.message) {

0 commit comments

Comments
 (0)
Please sign in to comment.