depot/third_party/nixpkgs/pkgs/development/tools/build-managers/rebar3/global-plugins.patch
Default email c594a97518 Project import generated by Copybara.
GitOrigin-RevId: 301aada7a64812853f2e2634a530ef5d34505048
2022-10-21 20:38:19 +02:00

14 lines
761 B
Diff

diff --git a/apps/rebar/src/rebar_plugins.erl b/apps/rebar/src/rebar_plugins.erl
index 469be42e..3a901cbe 100644
--- a/apps/rebar/src/rebar_plugins.erl
+++ b/apps/rebar/src/rebar_plugins.erl
@@ -31,7 +31,8 @@ project_plugins_install(State) ->
top_level_install(State) ->
Profiles = rebar_state:current_profiles(State),
lists:foldl(fun(Profile, StateAcc) ->
- Plugins = rebar_state:get(State, {plugins, Profile}, []),
+ Plugins = rebar_state:get(State, {plugins, Profile}, [])
+ ++ [list_to_atom(P) || P <- string:lexemes(os:getenv("REBAR_GLOBAL_PLUGINS", ""), " ")],
handle_plugins(Profile, Plugins, StateAcc)
end, State, Profiles).