From 0638c85634f3f9f51f17f247a3376f72b2f4d2fa Mon Sep 17 00:00:00 2001 From: Tristan Sloughter Date: Fri, 6 Mar 2015 08:59:10 -0600 Subject: store base opts after initialization of providers --- src/rebar3.erl | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/rebar3.erl') 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 -- cgit v1.1