diff options
author | Fred Hebert <mononcqc@ferd.ca> | 2017-02-24 18:41:07 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-24 18:41:07 -0500 |
commit | 7918be19c36a7a81721a0e88f7f32df4cea81a3f (patch) | |
tree | 4ca77dcd8bb2529ce4ea9a12651b3c0db7c5fa8b /src/rebar_prv_plugins.erl | |
parent | 4725d363c5b5583c9910f078da38c5b3a1d97aab (diff) | |
parent | ab1f93d6fa712c3b85bce30cab09edb5ddf7f3d9 (diff) |
Merge pull request #1486 from ferd/src_dir-is-respected
Add respect for src_dirs option in app_discover and app_info
Diffstat (limited to 'src/rebar_prv_plugins.erl')
-rw-r--r-- | src/rebar_prv_plugins.erl | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/rebar_prv_plugins.erl b/src/rebar_prv_plugins.erl index 7e6b88e..9e04fa8 100644 --- a/src/rebar_prv_plugins.erl +++ b/src/rebar_prv_plugins.erl @@ -34,14 +34,17 @@ do(State) -> GlobalConfigFile = rebar_dir:global_config(), GlobalConfig = rebar_state:new(rebar_config:consult_file(GlobalConfigFile)), GlobalPlugins = rebar_state:get(GlobalConfig, plugins, []), + GlobalSrcDirs = rebar_state:get(GlobalConfig, src_dirs, ["src"]), GlobalPluginsDir = filename:join([rebar_dir:global_cache_dir(rebar_state:opts(State)), "plugins", "*"]), - GlobalApps = rebar_app_discover:find_apps([GlobalPluginsDir], all), + GlobalApps = rebar_app_discover:find_apps([GlobalPluginsDir], GlobalSrcDirs, all), display_plugins("Global plugins", GlobalApps, GlobalPlugins), + RebarOpts = rebar_state:opts(State), + SrcDirs = rebar_dir:src_dirs(RebarOpts, ["src"]), Plugins = rebar_state:get(State, plugins, []), PluginsDir = filename:join(rebar_dir:plugins_dir(State), "*"), CheckoutsDir = filename:join(rebar_dir:checkouts_dir(State), "*"), - Apps = rebar_app_discover:find_apps([CheckoutsDir, PluginsDir], all), + Apps = rebar_app_discover:find_apps([CheckoutsDir, PluginsDir], SrcDirs, all), display_plugins("Local plugins", Apps, Plugins), {ok, State}. |