summaryrefslogtreecommitdiff
path: root/xmake/core/theme/theme.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2022-03-09 23:36:23 +0800
committerruki <[email protected]>2022-03-09 23:36:23 +0800
commit0aca668c37f645f7b8cdac44d3fb236c8f34196b (patch)
treebb9a0ff68d1791cb2ff51fa66dbba1e87fd8fb44 /xmake/core/theme/theme.lua
parentee016abc9a742108965131770761e6623e16d85a (diff)
fix theme.load
Diffstat (limited to 'xmake/core/theme/theme.lua')
-rw-r--r--xmake/core/theme/theme.lua10
1 files changed, 6 insertions, 4 deletions
diff --git a/xmake/core/theme/theme.lua b/xmake/core/theme/theme.lua
index 60c01ce1c..6ab9c592b 100644
--- a/xmake/core/theme/theme.lua
+++ b/xmake/core/theme/theme.lua
@@ -115,10 +115,12 @@ function theme.load(name)
-- find the theme script path
local scriptpath = nil
- for _, dir in ipairs(theme.directories()) do
- scriptpath = path.join(dir, name, "xmake.lua")
- if os.isfile(scriptpath) then
- break
+ if name then
+ for _, dir in ipairs(theme.directories()) do
+ scriptpath = path.join(dir, name, "xmake.lua")
+ if os.isfile(scriptpath) then
+ break
+ end
end
end