From 398b3085fc20c961a333f7b8f9277e5eb70b3482 Mon Sep 17 00:00:00 2001 From: Fred Hebert Date: Sat, 11 Jun 2016 11:38:38 -0400 Subject: Support ENV config for proxy values - The configured stuff in rebar3 takes precedence over the ENV - The env is then chosen --- src/rebar_utils.erl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/rebar_utils.erl b/src/rebar_utils.erl index 56a3940..ce6996c 100644 --- a/src/rebar_utils.erl +++ b/src/rebar_utils.erl @@ -789,9 +789,13 @@ maybe_ends_in_comma(H) -> end. get_http_vars(Scheme) -> + OS = case os:getenv(atom_to_list(Scheme)) of + Str when is_list(Str) -> Str; + _ -> [] + end, GlobalConfigFile = rebar_dir:global_config(), Config = rebar_config:consult_file(GlobalConfigFile), - proplists:get_value(Scheme, Config, []). + proplists:get_value(Scheme, Config, OS). set_httpc_options() -> set_httpc_options(https_proxy, get_http_vars(https_proxy)), -- cgit v1.1