summaryrefslogtreecommitdiff
path: root/src/rebar_core.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/rebar_core.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/rebar_core.erl')
-rw-r--r--src/rebar_core.erl9
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