Просмотр исходного кода

fix compilation of global plugins (#1935)

pull/1939/head
Tristan Sloughter 6 лет назад
committed by GitHub
Родитель
Сommit
60dc0504bf
Не найден GPG ключ соответствующий данной подписи Идентификатор GPG ключа: 4AEE18F83AFDEB23
1 измененных файлов: 7 добавлений и 4 удалений
  1. +7
    -4
      src/rebar3.erl

+ 7
- 4
src/rebar3.erl Просмотреть файл

@ -402,18 +402,21 @@ state_from_global_config(Config, GlobalConfigFile) ->
Resources = application:get_env(rebar, resources, []),
GlobalConfigThrowAway = rebar_state:create_resources(Resources, GlobalConfigThrowAway0),
GlobalState = case rebar_state:get(GlobalConfigThrowAway, plugins, []) of
Compilers = application:get_env(rebar, compilers, []),
GlobalConfigThrowAway1 = rebar_state:compilers(GlobalConfigThrowAway, Compilers),
GlobalState = case rebar_state:get(GlobalConfigThrowAway1, plugins, []) of
[] ->
GlobalConfigThrowAway;
GlobalConfigThrowAway1;
GlobalPluginsToInstall ->
rebar_plugins:handle_plugins(global,
GlobalPluginsToInstall,
GlobalConfigThrowAway)
GlobalConfigThrowAway1)
end,
GlobalPlugins = rebar_state:providers(GlobalState),
GlobalConfig2 = rebar_state:set(GlobalConfig, plugins, []),
GlobalConfig3 = rebar_state:set(GlobalConfig2, {plugins, global},
rebar_state:get(GlobalConfigThrowAway, plugins, [])),
rebar_state:get(GlobalConfigThrowAway1, plugins, [])),
rebar_state:providers(rebar_state:new(GlobalConfig3, Config), GlobalPlugins).
-spec test_state(rebar_state:t()) -> [{'extra_src_dirs',[string()]} | {'erl_opts',[any()]}].

Загрузка…
Отмена
Сохранить