瀏覽代碼

Use rebar own method to read global config file.

pull/579/head
CarlosEDP 10 年之前
父節點
當前提交
eb2d31be26
共有 1 個檔案被更改,包括 4 行新增12 行删除
  1. +4
    -12
      src/rebar_utils.erl

+ 4
- 12
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)),

Loading…
取消
儲存