depot/third_party/nixpkgs/pkgs/development/tools/build-managers/rebar3/global-plugins.patch
Default email 3e2acf8aff Project import generated by Copybara.
GitOrigin-RevId: d42cd445dde587e9a993cd9434cb43da07c4c5de
2021-05-20 18:08:51 -05:00

14 lines
717 B
Diff

diff --git a/src/rebar_plugins.erl b/src/rebar_plugins.erl
index f2d22233..bee2cf18 100644
--- a/src/rebar_plugins.erl
+++ b/src/rebar_plugins.erl
@@ -30,7 +30,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).