MCPcopy Index your code
hub / github.com/react/create-react-app / executeNodeScript

Function executeNodeScript

packages/react-dev-utils/openBrowser.js:46–65  ·  view source on GitHub ↗
(scriptPath, url)

Source from the content-addressed store, hash-verified

44}
45
46function executeNodeScript(scriptPath, url) {
47 const extraArgs = process.argv.slice(2);
48 const child = spawn(process.execPath, [scriptPath, ...extraArgs, url], {
49 stdio: 'inherit',
50 });
51 child.on('close', code => {
52 if (code !== 0) {
53 console.log();
54 console.log(
55 chalk.red(
56 'The script specified as BROWSER environment variable failed.'
57 )
58 );
59 console.log(chalk.cyan(scriptPath) + ' exited with code ' + code + '.');
60 console.log();
61 return;
62 }
63 });
64 return true;
65}
66
67function startBrowserProcess(browser, url, args) {
68 // If we're on OS X, the user hasn't specifically

Callers 1

openBrowserFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected