|
|
@ -155,8 +155,24 @@ set_httpc_options(_, []) -> |
|
|
|
set_httpc_options(Scheme, Proxy) -> |
|
|
|
{ok, {_, UserInfo, Host, Port, _, _}} = http_uri:parse(Proxy), |
|
|
|
httpc:set_options([{Scheme, {{Host, Port}, []}}], rebar), |
|
|
|
proxy_ipfamily(Host, inet:gethostbyname(Host)), |
|
|
|
set_proxy_auth(UserInfo). |
|
|
|
|
|
|
|
proxy_ipfamily(_Host, {ok, _}) -> |
|
|
|
ok; |
|
|
|
proxy_ipfamily(Host, {error, nxdomain}) -> |
|
|
|
maybe_proxy_family(Host, inet_db:res_option(inet6)). |
|
|
|
|
|
|
|
maybe_proxy_family(Host, true) -> |
|
|
|
maybe_set_ipfamily(inet:gethostbyname(Host, inet), inet); |
|
|
|
maybe_proxy_family(Host, false) -> |
|
|
|
maybe_set_ipfamily(inet:gethostbyname(Host, inet6), inet6). |
|
|
|
|
|
|
|
maybe_set_ipfamily({ok, _}, Family) -> |
|
|
|
httpc:set_options([{ipfamily, Family}], rebar); |
|
|
|
maybe_set_ipfamily(_, _Family) -> |
|
|
|
ok. |
|
|
|
|
|
|
|
compile(App, FirstFiles) -> |
|
|
|
Dir = filename:join(filename:absname("_build/default/lib/"), App), |
|
|
|
filelib:ensure_dir(filename:join([Dir, "ebin", "dummy.beam"])), |
|
|
|