diff options
| author | ruki <[email protected]> | 2016-02-13 22:00:34 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2016-02-15 19:10:27 +0800 |
| commit | d18b7f588a8887644d53cb5f044589085097f98e (patch) | |
| tree | a71314e5f08faa1c17c4cbe945bd5d4479faa0e4 /xmake/core/base/template.lua | |
| parent | 9464b2b9c7c48ff032d0f91472ba071598f1ac6d (diff) | |
fix template bug
Diffstat (limited to 'xmake/core/base/template.lua')
| -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 |
