Opens Chrome stable if Chrome Canary is running
Created by: kornelski
Description
npm start
opens wrong browser. I have both Chrome and Chrome Canary on my system, but I only use Canary (which is set as my default browser system-wide).
Expected behavior
npm start
should open my default browser.
Actual behavior
Ignores my default browser setting, and opens Chrome (stable).
Reproducible Demo
- Start Google Chrome Canary.app
- run
npm start
Cause of the bug
node_modules/react-dev-utils/openBrowser.js:
execSync('ps cax | grep "Google Chrome"');
grep incorrectly matches "Google Chrome Canary". Probably the same error would happen with Beta.
execSync('ps cax | grep "Google Chrome$"');
seems to fix the problem (tested on OS X 10.11). Alternatively, pgrep -x "Google Chrome"
may give more precise result.