diff options
author | CarlosEDP <me@carlosedp.com> | 2015-07-02 12:00:13 -0300 |
---|---|---|
committer | CarlosEDP <me@carlosedp.com> | 2015-07-03 16:40:30 -0300 |
commit | eb2d31be267ec0f85fe1bcd1f322c37149e3a9a3 (patch) | |
tree | 4ca34fe798034faeabd9eea8ccd4001bf9120234 /src | |
parent | 4a25a4d9d5f968fe2445707e8077a6efda596192 (diff) |
Use rebar own method to read global config file.
Diffstat (limited to 'src')
-rw-r--r-- | src/rebar_utils.erl | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/rebar_utils.erl b/src/rebar_utils.erl index 2bfe99e..1cd6694 100644 --- a/src/rebar_utils.erl +++ b/src/rebar_utils.erl @@ -663,18 +663,10 @@ maybe_ends_in_comma(H) -> _ -> false end. -get_http_var() -> - {ok, [[Home]]} = init:get_argument(home), - ConfDir = filename:join(Home, ".config/rebar3"), - case file:consult(filename:join(ConfDir, "rebar.config")) of - {ok, Config} -> - Config; - _ -> - [] - end. - -get_http(Scheme) -> - proplists:get_value(Scheme, get_http_var(), []). +get_http_vars(Scheme) -> + GlobalConfigFile = rebar_dir:global_config(), + Config = rebar_config:consult_file(GlobalConfigFile), + proplists:get_value(Scheme, Config, []). set_httpc_options() -> set_httpc_options(https_proxy, get_http_vars(https_proxy)), |