Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

find_chrome() can't find Chromium on Mac #91

Closed
rossellhayes opened this issue Jul 8, 2022 · 1 comment · Fixed by #117
Closed

find_chrome() can't find Chromium on Mac #91

rossellhayes opened this issue Jul 8, 2022 · 1 comment · Fixed by #117

Comments

@rossellhayes
Copy link

rossellhayes commented Jul 8, 2022

find_chrome() currently only looks for Chromium on Linux. On Mac and Windows, it only looks for Google Chrome.

I can't speak to Windows, but Chromium support could be added on Mac by tweaking the logic in #13, because Sys.which("chromium") works on Mac (at least if Chromium is installed through Homebrew).

if (is_mac()) {
  path <- "/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome"
  if (!file.exists(path)) {
    path <- Sys.which("chromium-browser")
  }
  if (nchar(path) == 0) {
    path <- Sys.which("chromium")
  }
  if (nchar(path) == 0) {
    message("Google Chrome and Chromium were not found. Try setting the `CHROMOTE_CHROME` environment variable.")
    path <- NULL
  }
}

I'd be happy to open a PR if this would be appreciated!

@gadenbuie
Copy link
Member

Thanks @rossellhayes! This should be addressed by #117 (we now try the linux options on Mac, just in case).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants