瀏覽代碼

Adding generic get/3; still need some cleanup

pull/3/head
Dave Smith 15 年之前
父節點
當前提交
cf6738928d
共有 1 個檔案被更改,包括 9 行新增0 行删除
  1. +9
    -0
      src/rebar_config.erl

+ 9
- 0
src/rebar_config.erl 查看文件

@ -27,6 +27,7 @@
-export([new/1,
get_modules/2,
get_list/3,
get/3,
set_global/2, get_global/2]).
-include("rebar.hrl").
@ -74,6 +75,14 @@ get_list(Config, Key, Default) ->
List
end.
get(Config, Key, Default) ->
case orddict:find(Key, Config#config.opts) of
error ->
Default;
{ok, Value} ->
Value
end.
set_global(Key, Value) ->
application:set_env(rebar_global, Key, Value).

Loading…
取消
儲存