diff options
author | Fred Hebert <mononcqc@ferd.ca> | 2019-07-04 11:39:15 -0400 |
---|---|---|
committer | Fred Hebert <mononcqc@ferd.ca> | 2019-07-04 11:45:48 -0400 |
commit | 44ab2dfd1ab5627496b04cafd56e8a494a926cc2 (patch) | |
tree | 198bb81de415fda684d925302ff729c387e35155 /src | |
parent | 0d9e5bb37d82a116975be7925ae7a4ca8c8d12bb (diff) |
Ensure EDoc opts in umbrella apps are respected
This adds an additional loading and merging of options for EDoc using
the values from the top-level along with those specified in the
rebar.config of an umbrella application.
The app-specific config values are prepended to the global ones; this
can likely cause some problems with manual path handling, but is
unlikely to happen in practice and the rest seems to work fine based on
order
Fixes the issue in #2114
Diffstat (limited to 'src')
-rw-r--r-- | src/rebar_prv_edoc.erl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/rebar_prv_edoc.erl b/src/rebar_prv_edoc.erl index c78296a..5e563ab 100644 --- a/src/rebar_prv_edoc.erl +++ b/src/rebar_prv_edoc.erl @@ -45,7 +45,10 @@ do(State) -> AppName = rebar_utils:to_list(rebar_app_info:name(AppInfo)), ?INFO("Running edoc for ~ts", [AppName]), AppDir = rebar_app_info:dir(AppInfo), - AppRes = (catch edoc:application(list_to_atom(AppName), AppDir, EdocOptsAcc)), + AppOpts = rebar_app_info:opts(AppInfo), + %% order of the merge is important to allow app opts overrides + AppEdocOpts = rebar_opts:get(AppOpts, edoc_opts, []) ++ EdocOptsAcc, + AppRes = (catch edoc:application(list_to_atom(AppName), AppDir, AppEdocOpts)), rebar_hooks:run_all_hooks(Cwd, post, ?PROVIDER, Providers, AppInfo, State), case {AppRes, ShouldAccPaths} of {ok, true} -> |