From 95f46b973794b37ccd62edbcc3bfb010b0f23dcc Mon Sep 17 00:00:00 2001 From: ruki Date: Sat, 15 Dec 2018 00:41:39 +0800 Subject: improve interpreter --- xmake/core/project/template.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'xmake/core/project/template.lua') diff --git a/xmake/core/project/template.lua b/xmake/core/project/template.lua index c21e5c869..bd140a024 100644 --- a/xmake/core/project/template.lua +++ b/xmake/core/project/template.lua @@ -144,8 +144,14 @@ function template.templates(language) -- load template for _, templatefile in ipairs(templatefiles) do + -- load script + local ok, errors = interp:load(templatefile) + if not ok then + os.raise(errors) + end + -- load templates - local results, errors = interp:load(templatefile, nil, true, true) + local results, errors = interp:make(nil, true, true) if not results then -- trace os.raise(errors) -- cgit v1.3.1