Fix launchChrome for chromium on Ubuntu
Summary: On Ubuntu (and maybe other distros), the executable for the chromium browser is 'chromium-browser' instead of 'chromium'. This commit calls 'chromium-browser' before calling 'chromium' if it exists. Start an example app on Android with "react-native init project && react-native run-android". Open DevTools: it opens chromium correctly. [CLI] [BUGFIX] [local-cli/server/utils/launchChrome.js] - Fix launchChrome for chromium on Ubuntu Closes https://github.com/facebook/react-native/pull/16658 Differential Revision: D6241686 Pulled By: hramos fbshipit-source-id: 5cd435c3c42c29f0916679298e62e7a323468e37
This commit is contained in:
parent
9476730cc4
commit
758111a706
|
@ -36,6 +36,8 @@ function getChromeAppName(): string {
|
|||
case 'linux':
|
||||
if (commandExistsUnixSync('google-chrome')) {
|
||||
return 'google-chrome';
|
||||
} else if (commandExistsUnixSync('chromium-browser')) {
|
||||
return 'chromium-browser';
|
||||
} else {
|
||||
return 'chromium';
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue