Skip to content

Commit

Permalink
Fix launchChrome for chromium on Ubuntu
Browse files Browse the repository at this point in the history
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 #16658

Differential Revision: D6241686

Pulled By: hramos

fbshipit-source-id: 5cd435c3c42c29f0916679298e62e7a323468e37
  • Loading branch information
nfeignon authored and facebook-github-bot committed Nov 4, 2017
1 parent 9476730 commit 758111a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions local-cli/server/util/launchChrome.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}
Expand Down

0 comments on commit 758111a

Please sign in to comment.