Skip to content

Commit

Permalink
Use path returned by System.find_executable
Browse files Browse the repository at this point in the history
  • Loading branch information
dvic committed Jul 24, 2023
1 parent bd32f82 commit 7359523
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/wallaby/chrome.ex
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ defmodule Wallaby.Chrome do
|> Keyword.get(:binary, [])

[Path.expand(chrome_path) | default_chrome_paths]
|> Enum.find(&System.find_executable/1)
|> Enum.find_value(&System.find_executable/1)
|> case do
path when is_binary(path) ->
{:ok, path}
Expand All @@ -257,7 +257,7 @@ defmodule Wallaby.Chrome do
|> Keyword.get(:path, "chromedriver")

[Path.expand(chromedriver_path), chromedriver_path]
|> Enum.find(&System.find_executable/1)
|> Enum.find_value(&System.find_executable/1)
|> case do
path when is_binary(path) ->
{:ok, path}
Expand Down

0 comments on commit 7359523

Please sign in to comment.