Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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.
  • Loading branch information...
commit 8b486055e4c8ca473a7b9f389ea8477f3bf5e996 1 parent 7e84634
@toland toland authored tuncer committed
Showing with 10 additions and 6 deletions.
  1. +10 −6 src/rebar_erlydtl_compiler.erl
View
16 src/rebar_erlydtl_compiler.erl
@@ -82,12 +82,16 @@
compile(Config, _AppFile) ->
DtlOpts = erlydtl_opts(Config),
- rebar_base_compiler:run(Config, [],
- option(doc_root, DtlOpts),
- option(source_ext, DtlOpts),
- option(out_dir, DtlOpts),
- option(module_ext, DtlOpts) ++ ".beam",
- fun compile_dtl/3, [{check_last_mod, false}]).
+ OrigPath = code:get_path(),
+ true = code:add_path(filename:join(rebar_utils:get_cwd(), "ebin")),
+ Result = rebar_base_compiler:run(Config, [],
+ option(doc_root, DtlOpts),
+ option(source_ext, DtlOpts),
+ option(out_dir, DtlOpts),
+ option(module_ext, DtlOpts) ++ ".beam",
+ fun compile_dtl/3, [{check_last_mod, false}]),
+ true = code:set_path(OrigPath),
+ Result.
%% ===================================================================
Please sign in to comment.
Something went wrong with that request. Please try again.