diff --git a/src/rebar_templater.erl b/src/rebar_templater.erl index 5e1e572..3154b83 100644 --- a/src/rebar_templater.erl +++ b/src/rebar_templater.erl @@ -64,8 +64,8 @@ ?CONSOLE("Available templates:\n", []), _ = [begin 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) -> [atom_to_list(V) | Acc] end, [], VarList),