소스 검색

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.
pull/3/head
Phil Toland 13 년 전
committed by Tuncer Ayaz
부모
커밋
8b486055e4
1개의 변경된 파일10개의 추가작업 그리고 6개의 파일을 삭제
  1. +10
    -6
      src/rebar_erlydtl_compiler.erl

+ 10
- 6
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.
%% ===================================================================

불러오는 중...
취소
저장