From 49f3cc4108d0dcc70f74ed02edf4d933c6fbfdb0 Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Sat, 30 Jun 2012 22:14:08 +0200 Subject: [PATCH] Fix crash introduced in 4414f65 via pull/245 --- src/rebar_templater.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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),