Merge pull request #14 from tuncer/fix-list-keysort-call

Fix rebar_erlydtl_compiler:erlydtl_opts/1 and rebar:run/2
This commit is contained in:
Dave Smith 2012-11-10 16:57:14 -08:00
commit 38b08252c6
2 changed files with 2 additions and 2 deletions

View file

@ -69,7 +69,7 @@ main(Args) ->
%% Erlang-API entry point %% Erlang-API entry point
run(BaseConfig, Commands) -> run(BaseConfig, Commands) ->
application:load(rebar), _ = application:load(rebar),
run_aux(BaseConfig, Commands). run_aux(BaseConfig, Commands).
%% ==================================================================== %% ====================================================================

View file

@ -133,7 +133,7 @@ erlydtl_opts(Config) ->
Tuples = [{K,V} || {K,V} <- Opts], Tuples = [{K,V} || {K,V} <- Opts],
case [L || L <- Opts, is_list(L), not io_lib:printable_list(L)] of case [L || L <- Opts, is_list(L), not io_lib:printable_list(L)] of
[] -> [] ->
lists:keysort(1, [Tuples]); lists:keysort(1, Tuples);
Lists -> Lists ->
lists:map(fun(L) -> lists:map(fun(L) ->
lists:keysort(1, lists:foldl(fun({K,T}, Acc) -> lists:keysort(1, lists:foldl(fun({K,T}, Acc) ->