summaryrefslogtreecommitdiff
path: root/xmake/actions/create/template.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2026-08-09 18:25:05 +0800
committerGitHub <[email protected]>2026-08-09 18:25:05 +0800
commitced7f2ae519bc9eca92bcf4f177fe177ddd0e747 (patch)
treeaf4d584b3c7badc1df56038cdb29099b4f3e99fd /xmake/actions/create/template.lua
parent6ac4ea833193a4319a1eb6e5f588d1877fd48064 (diff)
parent5f5daf64c504e1103a355f45bf925a5149b03e24 (diff)
Merge pull request #7699 from xmake-io/templates
move templates dir
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