Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions packages/react-dev-utils/openBrowser.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

var chalk = require('chalk');
var execSync = require('child_process').execSync;
var execFileSync = require('child_process').execFileSync;
var spawn = require('cross-spawn');
var open = require('open');

Expand Down Expand Up @@ -91,12 +92,9 @@ function startBrowserProcess(browser, url, args) {
// Try our best to reuse existing tab
// on OSX Chromium-based browser with AppleScript
execSync('ps cax | grep "' + chromiumBrowser + '"');
execSync(
'osascript openChrome.applescript "' +
encodeURI(url) +
'" "' +
chromiumBrowser +
'"',
execFileSync(
'osascript',
['openChrome.applescript', encodeURI(url), chromiumBrowser],
{
cwd: __dirname,
stdio: 'ignore',
Expand Down