summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2019-08-12 22:32:45 +0800
committerruki <[email protected]>2019-08-12 09:16:30 +0800
commit4a6c8223a06325e0286ca4d7f79e954565d77828 (patch)
tree64c07b236a8b57cf9d1394d2bab8352b7d405f32
parent68afe67e72fd5a94fb4fca8059952661833182db (diff)
fix show help with theme
-rw-r--r--xmake/core/main.lua32
1 files changed, 16 insertions, 16 deletions
diff --git a/xmake/core/main.lua b/xmake/core/main.lua
index ed8153517..4ac0792bb 100644
--- a/xmake/core/main.lua
+++ b/xmake/core/main.lua
@@ -175,8 +175,23 @@ function main.entry()
-- init
main._init()
+ -- load global configuration
+ local ok, errors = global.load()
+ if not ok then
+ utils.error(errors)
+ return -1
+ end
+
+ -- load theme
+ local theme_inst, errors = theme.load(global.get("theme") or "default")
+ if not theme_inst then
+ utils.error(errors)
+ return -1
+ end
+ colors.theme_set(theme_inst)
+
-- init option
- local ok, errors = option.init(menu)
+ ok, errors = option.init(menu)
if not ok then
utils.error(errors)
return -1
@@ -199,21 +214,6 @@ Or you can add `--root` option or XMAKE_ROOT=y to allow run as root temporarily.
-- start profiling
-- profiler:start()
- -- load global configuration
- ok, errors = global.load()
- if not ok then
- utils.error(errors)
- return -1
- end
-
- -- load theme
- local theme_inst, errors = theme.load(global.get("theme") or "default")
- if not theme_inst then
- utils.error(errors)
- return -1
- end
- colors.theme_set(theme_inst)
-
-- show help?
if main._show_help() then
return 0