Переглянути джерело

Merge pull request #321 from tsloughter/rm_global_plugins

Remove global plugins
pull/272/merge
Fred Hebert 10 роки тому
джерело
коміт
56ea365ca5
2 змінених файлів з 3 додано та 6 видалено
  1. +2
    -3
      src/rebar3.erl
  2. +1
    -3
      src/rebar_plugins.erl

+ 2
- 3
src/rebar3.erl Переглянути файл

@ -156,9 +156,8 @@ init_config() ->
true ->
?DEBUG("Load global config file ~p",
[GlobalConfigFile]),
GlobalConfig = rebar_state:new(global, rebar_config:consult_file(GlobalConfigFile)),
GlobalConfig1 = rebar_plugins:install(GlobalConfig),
rebar_state:new(GlobalConfig1, Config1);
GlobalConfig = rebar_state:new(rebar_config:consult_file(GlobalConfigFile)),
rebar_state:new(GlobalConfig, Config1);
false ->
rebar_state:new(Config1)
end,

+ 1
- 3
src/rebar_plugins.erl Переглянути файл

@ -13,18 +13,16 @@
-spec install(rebar_state:t()) -> rebar_state:t().
install(State) ->
DepsDir = rebar_dir:deps_dir(State),
Plugins = rebar_state:get(State, plugins, []),
ProjectApps = rebar_state:project_apps(State),
DepApps = rebar_app_discover:find_apps([DepsDir], all),
OtherPlugins = lists:flatmap(fun(App) ->
AppDir = rebar_app_info:dir(App),
C = rebar_config:consult(AppDir),
S = rebar_state:new(rebar_state:new(), C, AppDir),
rebar_state:get(S, plugins, [])
end, ProjectApps++DepApps),
end, ProjectApps),
handle_plugins(Plugins++OtherPlugins, State).

Завантаження…
Відмінити
Зберегти