diff options
author | Fred Hebert <mononcqc@ferd.ca> | 2015-03-06 10:39:39 -0500 |
---|---|---|
committer | Fred Hebert <mononcqc@ferd.ca> | 2015-03-06 10:39:39 -0500 |
commit | bc5d1cb155ad99d6e605cc80952bd34d8a3de17e (patch) | |
tree | 5a4e2f90b26ca3ef3cc92b87a1377b3faa3c2915 /src/rebar_state.erl | |
parent | 9903b5271f5a27faf5485bfc32944b8969a2f4e9 (diff) | |
parent | 0399b0eeb30d531360faa888c7d64b5d0b2f09ce (diff) |
Merge pull request #233 from tsloughter/base_opts
apply profiles and overrides for an app's opts to the base opts
Diffstat (limited to 'src/rebar_state.erl')
-rw-r--r-- | src/rebar_state.erl | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/rebar_state.erl b/src/rebar_state.erl index 8170b8d..e77a259 100644 --- a/src/rebar_state.erl +++ b/src/rebar_state.erl @@ -3,7 +3,7 @@ -export([new/0, new/1, new/2, new/3, get/2, get/3, set/3, - opts/1, + opts/1, opts/2, default/1, default/2, escript_path/1, escript_path/2, @@ -37,7 +37,6 @@ -record(state_t, {dir :: file:name(), opts = dict:new() :: rebar_dict(), default = dict:new() :: rebar_dict(), - escript_path :: undefined | file:filename_all(), lock = [], @@ -97,6 +96,7 @@ new(ParentState, Config, Dir) -> D = proplists:get_value(deps, Config, []), dict:from_list([{{deps, default}, D} | Config]) end, + NewOpts = dict:merge(fun(_Key, Value1, _Value2) -> Value1 end, LocalOpts, Opts), @@ -129,6 +129,9 @@ default(State, Opts) -> opts(#state_t{opts=Opts}) -> Opts. +opts(State, Opts) -> + State#state_t{opts=Opts}. + current_profiles(#state_t{current_profiles=Profiles}) -> Profiles. |