diff options
| author | ruki <[email protected]> | 2019-09-17 22:29:58 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2019-09-17 08:59:51 +0800 |
| commit | 916078fdb2904340ef2003a46057d9232194511a (patch) | |
| tree | bb4c4ecc3987398915d37dea92ca43911d5d59e2 | |
| parent | 860f2ddcfee2546ec9feeb8749fc5e5acd2a5b43 (diff) | |
improve to find xmake.lua for task/template
| -rw-r--r-- | xmake/core/base/task.lua | 2 | ||||
| -rw-r--r-- | xmake/core/project/template.lua | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/xmake/core/base/task.lua b/xmake/core/base/task.lua index 82ac2bea2..4e63ce544 100644 --- a/xmake/core/base/task.lua +++ b/xmake/core/base/task.lua @@ -386,7 +386,7 @@ function task.tasks() for _, dir in ipairs(dirs) do -- get files - local files = os.match(path.join(dir, "**/xmake.lua")) + local files = os.files(path.join(dir, "*", "xmake.lua")) if files then for _, filepath in ipairs(files) do diff --git a/xmake/core/project/template.lua b/xmake/core/project/template.lua index 4dae83130..98593be24 100644 --- a/xmake/core/project/template.lua +++ b/xmake/core/project/template.lua @@ -135,7 +135,7 @@ function template.templates(language) -- load all templates local templates = {} - local templatefiles = os.files(path.join(os.programdir(), "templates", language, "**", "template.lua")) + local templatefiles = os.files(path.join(os.programdir(), "templates", language, "*", "template.lua")) if templatefiles then -- load template |
