Browse Source

Fix crash introduced in 4414f65 via pull/245

pull/3/head
Tuncer Ayaz 13 years ago
parent
commit
49f3cc4108
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/rebar_templater.erl

+ 2
- 2
src/rebar_templater.erl View File

@ -64,8 +64,8 @@
?CONSOLE("Available templates:\n", []), ?CONSOLE("Available templates:\n", []),
_ = [begin _ = [begin
BaseName = filename:basename(F, ".template"), BaseName = filename:basename(F, ".template"),
{ok, Template} = file:consult(F),
{_, VarList} = lists:keyfind(variables, 1, Template),
TemplateTerms = consult(load_file(Type, F)),
{_, VarList} = lists:keyfind(variables, 1, TemplateTerms),
Vars = lists:foldl(fun({V,_}, Acc) -> Vars = lists:foldl(fun({V,_}, Acc) ->
[atom_to_list(V) | Acc] [atom_to_list(V) | Acc]
end, [], VarList), end, [], VarList),

Loading…
Cancel
Save