diff options
author | Tristan Sloughter <tristan.sloughter@gmail.com> | 2014-12-24 13:09:27 -0600 |
---|---|---|
committer | Tristan Sloughter <tristan.sloughter@gmail.com> | 2014-12-24 13:09:27 -0600 |
commit | 1800ed481e580e8031c817762c0d7fe28b41c2d8 (patch) | |
tree | 39f1946db83a747492dfa1009fbadef459026fae /src/rebar_plugins.erl | |
parent | faeb3d3989d47fb8680fdef3a598ebc4fae62f65 (diff) | |
parent | 91d297cf8ac59849137d360b58c1dcd1a719e4a9 (diff) |
Merge pull request #77 from tsloughter/master
update plugin install code
Diffstat (limited to 'src/rebar_plugins.erl')
-rw-r--r-- | src/rebar_plugins.erl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rebar_plugins.erl b/src/rebar_plugins.erl index e1f529d..45cb5c9 100644 --- a/src/rebar_plugins.erl +++ b/src/rebar_plugins.erl @@ -28,7 +28,8 @@ install(State) -> -spec handle_plugin(rebar_prv_install_deps:dep(), rebar_state:t()) -> {true, any()} | false. handle_plugin(Plugin, State) -> try - {ok, _, State1} = rebar_prv_install_deps:handle_deps(State, [Plugin]), + {ok, _, State1} = rebar_prv_install_deps:handle_deps(default, State, [Plugin]), + Apps = rebar_state:all_deps(State1), ToBuild = lists:dropwhile(fun rebar_app_info:valid/1, Apps), lists:foreach(fun(AppInfo) -> @@ -55,7 +56,7 @@ plugin_providers(Plugin) when is_atom(Plugin) -> validate_plugin(Plugin). validate_plugin(Plugin) -> - application:load(Plugin), + ok = application:load(Plugin), case application:get_env(Plugin, providers) of {ok, Providers} -> {true, Providers}; |