try to find the Chrome executable in different paths

This commit is contained in:
Marten Seemann
2017-08-23 16:43:44 +07:00
parent 3bb4662cfc
commit cbc6f64461

View File

@@ -102,7 +102,14 @@ func getChromePath() string {
if runtime.GOOS == "darwin" { if runtime.GOOS == "darwin" {
return "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" return "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
} }
return "google-chrome" if path, err := exec.LookPath("google-chrome"); err == nil {
return path
}
if path, err := exec.LookPath("chromium-browser"); err == nil {
return path
}
Fail("No Chrome executable found.")
return ""
} }
func chromeTest(version protocol.VersionNumber, url string, blockUntilDone func()) { func chromeTest(version protocol.VersionNumber, url string, blockUntilDone func()) {