summaryrefslogtreecommitdiff
path: root/src/rebar3.erl
diff options
context:
space:
mode:
authorFred Hebert <mononcqc@ferd.ca>2015-03-06 10:39:39 -0500
committerFred Hebert <mononcqc@ferd.ca>2015-03-06 10:39:39 -0500
commitbc5d1cb155ad99d6e605cc80952bd34d8a3de17e (patch)
tree5a4e2f90b26ca3ef3cc92b87a1377b3faa3c2915 /src/rebar3.erl
parent9903b5271f5a27faf5485bfc32944b8969a2f4e9 (diff)
parent0399b0eeb30d531360faa888c7d64b5d0b2f09ce (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/rebar3.erl')
-rw-r--r--src/rebar3.erl9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/rebar3.erl b/src/rebar3.erl
index d7597cd..5b7db24 100644
--- a/src/rebar3.erl
+++ b/src/rebar3.erl
@@ -115,8 +115,7 @@ run_aux(State, GlobalPluginProviders, RawArgs) ->
false ->
State;
Profile ->
- State1 = rebar_state:apply_profiles(State, [list_to_atom(Profile)]),
- rebar_state:default(State1, rebar_state:opts(State1))
+ rebar_state:apply_profiles(State, [list_to_atom(Profile)])
end,
%% Process each command, resetting any state between each one
@@ -127,11 +126,15 @@ run_aux(State, GlobalPluginProviders, RawArgs) ->
{ok, Providers} = application:get_env(rebar, providers),
{ok, PluginProviders, State4} = rebar_plugins:install(State3),
rebar_core:update_code_path(State4),
+
+ %% Providers can modify profiles stored in opts, so set default after initializing providers
AllProviders = Providers++PluginProviders++GlobalPluginProviders,
State5 = rebar_state:create_logic_providers(AllProviders, State4),
+ State6 = rebar_state:default(State5, rebar_state:opts(State5)),
+
{Task, Args} = parse_args(RawArgs),
- rebar_core:process_command(rebar_state:command_args(State5, Args), Task).
+ rebar_core:process_command(rebar_state:command_args(State6, Args), Task).
init_config() ->
%% Initialize logging system