Make AppleScript call more bulletproof and silence its output

Fixes #322
This commit is contained in:
Dan Abramov
2016-08-02 15:00:36 +01:00
parent fa38991b75
commit 44b8313213

View File

@@ -136,9 +136,8 @@ function openBrowser(port) {
// on OS X Google Chrome with AppleScript
execSync('ps cax | grep "Google Chrome"');
execSync(
'osascript ' +
path.resolve(__dirname, './utils/chrome.applescript') +
' http://localhost:' + port + '/'
'osascript chrome.applescript http://localhost:' + port + '/',
{cwd: path.join(__dirname, 'utils'), stdio: 'ignore'}
);
return;
} catch (err) {