diff options
author | Tristan Sloughter <t@crashfast.com> | 2014-08-28 09:17:01 -0500 |
---|---|---|
committer | Tristan Sloughter <t@crashfast.com> | 2014-08-28 09:17:01 -0500 |
commit | 393abe92d01040a847bfc42a80d61b33f0254ca7 (patch) | |
tree | 2441809c82d2dc5fe4ac4c818b6714221a0915e2 /src/rebar.erl | |
parent | 97db15d2a58de542aaef4075cddc3769f0308759 (diff) |
use locks if exists
Diffstat (limited to 'src/rebar.erl')
-rw-r--r-- | src/rebar.erl | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/rebar.erl b/src/rebar.erl index 338e97b..01dca79 100644 --- a/src/rebar.erl +++ b/src/rebar.erl @@ -131,6 +131,13 @@ init_config({Options, _NonOptArgs}) -> rebar_config:consult_file(ConfigFile) end, + Config1 = case rebar_config:consult_file(?LOCK_FILE) of + [D] -> + [{locks, D} | Config]; + _ -> + Config + end, + %% If $HOME/.rebar/config exists load and use as global config GlobalConfigFile = filename:join([os:getenv("HOME"), ".rebar", "config"]), State = case filelib:is_regular(GlobalConfigFile) of @@ -138,9 +145,9 @@ init_config({Options, _NonOptArgs}) -> ?DEBUG("Load global config file ~p~n", [GlobalConfigFile]), rebar_config:consult_file(GlobalConfigFile), - rebar_state:new(GlobalConfigFile, Config); + rebar_state:new(GlobalConfigFile, Config1); false -> - rebar_state:new(Config) + rebar_state:new(Config1) end, %% Initialize vsn cache |