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

Support Chromium and configurable Chrome Path #32

Open
holsee opened this issue May 3, 2019 · 2 comments
Open

Support Chromium and configurable Chrome Path #32

holsee opened this issue May 3, 2019 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@holsee
Copy link
Owner

holsee commented May 3, 2019

Short term goal would be to support configuration of the path (as per other configuration through environment variables).

This function would need to be modified:

defp chrome_path do
case :os.type() do
{:unix, :darwin} ->
"/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome"
{:unix, _} ->
"/usr/bin/google-chrome"
end

From early testing, Chromium was fully compatible.

@holsee holsee added enhancement New feature or request good first issue Good for newcomers labels May 3, 2019
@eahanson
Copy link
Contributor

eahanson commented Jul 9, 2019

FWIW, I'm able to set a different browser path with:

config :chroxy, Chroxy.ChromeServer, chrome_path: System.get_env("CHROXY_CHROME_PATH")

in my own app's config.exs when using Chroxy as a library.

Is the implementation of this feature just adding the above line to Chroxy's config.exs?

@holsee
Copy link
Owner Author

holsee commented Jul 18, 2019

Looks like I have implemented this and forgot:

config = Application.get_env(:chroxy, __MODULE__)
opts =
default_opts()
|> Keyword.merge(config)
|> Keyword.merge(args)

I would suggest we document this in the README or we add that ENV VAR as something baked in that will take the first precedence.

Documentation should be fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants