File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -390,11 +390,18 @@ defmodule Tailwind do
390390 defp fallback ( :inet6 ) , do: :inet
391391
392392 defp proxy_for_scheme ( "http" ) do
393- System . get_env ( "HTTP_PROXY" ) || System . get_env ( "http_proxy" )
393+ get_and_sanitize_env_var ( "HTTP_PROXY" ) || get_and_sanitize_env_var ( "http_proxy" )
394394 end
395395
396396 defp proxy_for_scheme ( "https" ) do
397- System . get_env ( "HTTPS_PROXY" ) || System . get_env ( "https_proxy" )
397+ get_and_sanitize_env_var ( "HTTPS_PROXY" ) || get_and_sanitize_env_var ( "https_proxy" )
398+ end
399+
400+ defp get_and_sanitize_env_var ( env_var ) do
401+ case String . trim ( System . get_env ( env_var , "" ) ) do
402+ "" -> nil
403+ trimmed -> trimmed
404+ end
398405 end
399406
400407 defp maybe_add_proxy_auth ( http_options , scheme ) do
You can’t perform that action at this time.
0 commit comments