diff options
Diffstat (limited to 'src/rebar_core.erl')
-rw-r--r-- | src/rebar_core.erl | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/rebar_core.erl b/src/rebar_core.erl index 205258a..f0d9b3d 100644 --- a/src/rebar_core.erl +++ b/src/rebar_core.erl @@ -78,12 +78,13 @@ process_command(State, Command) -> Command when Command =:= do; Command =:= as -> do(TargetProviders, State); _ -> + Profiles = providers:profiles(CommandProvider), + State1 = rebar_state:apply_profiles(State, Profiles), Opts = providers:opts(CommandProvider)++rebar3:global_option_spec_list(), - - case getopt:parse(Opts, rebar_state:command_args(State)) of + case getopt:parse(Opts, rebar_state:command_args(State1)) of {ok, Args} -> - State1 = rebar_state:command_parsed_args(State, Args), - do(TargetProviders, State1); + State2 = rebar_state:command_parsed_args(State1, Args), + do(TargetProviders, State2); {error, {invalid_option, Option}} -> {error, io_lib:format("Invalid option ~s on task ~p", [Option, Command])} end |