diff options
author | Tristan Sloughter <t@crashfast.com> | 2014-11-30 10:54:48 -0600 |
---|---|---|
committer | Tristan Sloughter <t@crashfast.com> | 2014-11-30 10:54:48 -0600 |
commit | 5fdf2f82d57ed0b404e5dfa207b4944f0b8a412d (patch) | |
tree | cfa3448da5680d81729e31407d51bc374a2c1ca9 /src/rebar_core.erl | |
parent | 3abb122b3557b62ce9a621f86f847b997aa540b1 (diff) |
add use of REBAR_PROFILE os var to set default profile
Diffstat (limited to 'src/rebar_core.erl')
-rw-r--r-- | src/rebar_core.erl | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/rebar_core.erl b/src/rebar_core.erl index 7dacc50..a79414a 100644 --- a/src/rebar_core.erl +++ b/src/rebar_core.erl @@ -42,15 +42,14 @@ process_command(State, Command) -> CommandProvider -> Profile = providers:profile(CommandProvider), State1 = rebar_state:current_profile(State, Profile), - State2 = rebar_state:apply_profile(State1, Profile), Opts = providers:opts(CommandProvider)++rebar3:global_option_spec_list(), case Command of do -> - do(TargetProviders, State2); + do(TargetProviders, State1); _ -> - case getopt:parse(Opts, rebar_state:command_args(State2)) of + case getopt:parse(Opts, rebar_state:command_args(State1)) of {ok, Args} -> - State3 = rebar_state:command_parsed_args(State2, Args), + State3 = rebar_state:command_parsed_args(State1, Args), do(TargetProviders, State3); {error, {invalid_option, Option}} -> {error, io_lib:format("Invalid option ~s on task ~p", [Option, Command])} |