summaryrefslogtreecommitdiff
path: root/src/rebar3.erl
diff options
context:
space:
mode:
authorTristan Sloughter <t@crashfast.com>2015-06-03 23:09:43 -0500
committerTristan Sloughter <t@crashfast.com>2015-06-18 22:08:19 -0500
commitf7ff07a87d3e282b4016c1725d149389b0d3b6f9 (patch)
tree8b1bcec2ea3ed1a3adf3a8211d59bab985a4464b /src/rebar3.erl
parent4edfed60a201921995cea987494839eeb6b75638 (diff)
plugins provider
Diffstat (limited to 'src/rebar3.erl')
-rw-r--r--src/rebar3.erl9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/rebar3.erl b/src/rebar3.erl
index e324687..5c0559f 100644
--- a/src/rebar3.erl
+++ b/src/rebar3.erl
@@ -95,12 +95,12 @@ run_aux(State, RawArgs) ->
%% Process each command, resetting any state between each one
BaseDir = rebar_state:get(State, base_dir, ?DEFAULT_BASE_DIR),
State3 = rebar_state:set(State2, base_dir,
- filename:join(filename:absname(rebar_state:dir(State2)), BaseDir)),
+ filename:join(filename:absname(rebar_state:dir(State2)), BaseDir)),
{ok, Providers} = application:get_env(rebar, providers),
%% Providers can modify profiles stored in opts, so set default after initializing providers
State4 = rebar_state:create_logic_providers(Providers, State3),
- State5 = rebar_plugins:install(State4),
+ State5 = rebar_plugins:project_apps_install(State4),
State6 = rebar_state:default(State5, rebar_state:opts(State5)),
{Task, Args} = parse_args(RawArgs),
@@ -133,13 +133,14 @@ init_config() ->
%% We don't want to worry about global plugin install state effecting later
%% usage. So we throw away the global profile state used for plugin install.
- GlobalConfigThrowAway = rebar_state:current_profiles(GlobalConfig, ["global"]),
+ GlobalConfigThrowAway = rebar_state:current_profiles(GlobalConfig, [global]),
GlobalState = rebar_plugins:handle_plugins(global,
rebar_state:get(GlobalConfigThrowAway, plugins, []),
GlobalConfigThrowAway),
GlobalPlugins = rebar_state:providers(GlobalState),
GlobalConfig2 = rebar_state:set(GlobalConfig, plugins, []),
- rebar_state:providers(rebar_state:new(GlobalConfig2, Config1), GlobalPlugins);
+ GlobalConfig3 = rebar_state:set(GlobalConfig2, {plugins, global}, rebar_state:get(GlobalConfigThrowAway, plugins, [])),
+ rebar_state:providers(rebar_state:new(GlobalConfig3, Config1), GlobalPlugins);
false ->
rebar_state:new(Config1)
end,