Skip to content

Commit 03122b5

Browse files
committed
Add ignore of stderr when executing process commands
- Make sure any potential errors don't leak to the user
1 parent e25f113 commit 03122b5

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

packages/react-dev-utils/getProcessForPort.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,14 @@ var chalk = require('chalk');
22
var execSync = require('child_process').execSync;
33
var path = require('path');
44

5-
var execOptions = { encoding: 'utf8' };
5+
var execOptions = {
6+
encoding: 'utf8',
7+
stdio: [
8+
'pipe', // stdin (default)
9+
'pipe', // stdout (default)
10+
'ignore' //stderr
11+
]
12+
};
613

714
function isProcessAReactApp(processCommand) {
815
return /^node .*react-scripts\/scripts\/start\.js\s?$/.test(processCommand);

0 commit comments

Comments
 (0)