diff options
| -rw-r--r-- | xmake/core/base/template.lua | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/xmake/core/base/template.lua b/xmake/core/base/template.lua index 06750f309..0440753fb 100644 --- a/xmake/core/base/template.lua +++ b/xmake/core/base/template.lua @@ -238,17 +238,13 @@ function template.create(language, templateid, targetname) end end - -- check - if not module.createscript then - utils.error("please set_createscript() first!") - return false - end - -- create project - local ok, errors = sandbox.load(module.createscript) - if not ok then - utils.errors(errors) - return false + if module.createscript then + local ok, errors = sandbox.load(module.createscript) + if not ok then + utils.errors(errors) + return false + end end -- ok |
