summaryrefslogtreecommitdiff
path: root/xmake/actions/create/template.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/actions/create/template.lua')
-rw-r--r--xmake/actions/create/template.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/xmake/actions/create/template.lua b/xmake/actions/create/template.lua
index 1279c1d35..e18015514 100644
--- a/xmake/actions/create/template.lua
+++ b/xmake/actions/create/template.lua
@@ -33,8 +33,9 @@ end
-- get all template roots with extra meta information
--
-- priority:
--- 1. repo: <global-repo>/templates (including builtin repo templates)
+-- 1. repo: <global-repo>/templates
-- 2. global: <globaldir>/templates
+-- 3. builtin: <programdir>/templates
function rootinfos()
local results = {}
@@ -54,6 +55,10 @@ function rootinfos()
if os.isdir(dir) then
table.insert(results, {kind = "global", dir = dir})
end
+ dir = path.join(os.programdir(), "templates")
+ if os.isdir(dir) then
+ table.insert(results, {kind = "builtin", dir = dir})
+ end
return results
end