mirror of
https://github.com/correl/rebar.git
synced 2024-11-23 19:19:54 +00:00
Fix compiling DTL templates with latest erlydtl
The latest version of erlydtl requires that custom tag modules be in the path when templates are compiled. Without this change rebar silently exits when using the custom_tags_modules option.
This commit is contained in:
parent
7e84634b8f
commit
8b486055e4
1 changed files with 10 additions and 6 deletions
|
@ -82,12 +82,16 @@
|
||||||
|
|
||||||
compile(Config, _AppFile) ->
|
compile(Config, _AppFile) ->
|
||||||
DtlOpts = erlydtl_opts(Config),
|
DtlOpts = erlydtl_opts(Config),
|
||||||
rebar_base_compiler:run(Config, [],
|
OrigPath = code:get_path(),
|
||||||
option(doc_root, DtlOpts),
|
true = code:add_path(filename:join(rebar_utils:get_cwd(), "ebin")),
|
||||||
option(source_ext, DtlOpts),
|
Result = rebar_base_compiler:run(Config, [],
|
||||||
option(out_dir, DtlOpts),
|
option(doc_root, DtlOpts),
|
||||||
option(module_ext, DtlOpts) ++ ".beam",
|
option(source_ext, DtlOpts),
|
||||||
fun compile_dtl/3, [{check_last_mod, false}]).
|
option(out_dir, DtlOpts),
|
||||||
|
option(module_ext, DtlOpts) ++ ".beam",
|
||||||
|
fun compile_dtl/3, [{check_last_mod, false}]),
|
||||||
|
true = code:set_path(OrigPath),
|
||||||
|
Result.
|
||||||
|
|
||||||
|
|
||||||
%% ===================================================================
|
%% ===================================================================
|
||||||
|
|
Loading…
Reference in a new issue