Browse Source

support new DTL return codes

Namdak Tonpa 6 years ago
parent
commit
bfd6889f87
2 changed files with 6 additions and 4 deletions
  1. 2 3
      rebar.config
  2. 4 1
      src/compile/mad_dtl.erl

+ 2 - 3
rebar.config

@@ -1,4 +1,3 @@
 {deps_dir,"deps"}.
-{erl_opts, [nowarn_export_all]}.
-{deps, [%{ling, ".*", {git, "git://github.com/cloudozer/ling", {tag, "master"}}},
-        {sh, ".*",   {git, "git://github.com/synrc/sh", []}}]}.
+{erl_opts,[nowarn_export_all]}.
+{deps,[{sh,".*",{git,"git://github.com/synrc/sh",[]}}]}.

+ 4 - 1
src/compile/mad_dtl.erl

@@ -55,4 +55,7 @@ compile_erlydtl_files(Opts) ->
              true -> ok end
     end,
 
-    lists:any(fun({error,_}) -> true; (ok) -> false end,[Compile(F) || F <- Files]).
+    lists:any(fun({error,_}) -> true;
+                 ({ok, _Module}) -> false;
+                 (ok) -> false
+        end, [Compile(F) || F <- Files]).