Skip to content

Commit

Permalink
Pass url as a string into fetch_body! as URI.parse would not succeed …
Browse files Browse the repository at this point in the history
…with a charlist (#111)
  • Loading branch information
JBraungardt authored Feb 7, 2025
1 parent 6f45cae commit 8ad425c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/tailwind.ex
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ defmodule Tailwind do
end
end

defp fetch_body!(url, retry \\ true) do
defp fetch_body!(url, retry \\ true) when is_binary(url) do
scheme = URI.parse(url).scheme
url = String.to_charlist(url)
Logger.debug("Downloading tailwind from #{url}")
Expand Down Expand Up @@ -350,7 +350,7 @@ defmodule Tailwind do
when inet in [:inet, :inet6] and
reason in [:ehostunreach, :enetunreach, :eprotonosupport, :nxdomain] ->
:httpc.set_options(ipfamily: fallback(inet))
fetch_body!(url, false)
fetch_body!(to_string(url), false)

other ->
raise """
Expand Down

0 comments on commit 8ad425c

Please sign in to comment.