diff options
| author | ruki <[email protected]> | 2025-11-05 22:45:54 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-11-07 15:01:57 +0800 |
| commit | 69393d505d86bdbbc522861045cb41d590c69b72 (patch) | |
| tree | 2d5111c0e765060bb981271dddb99b8722352787 | |
| parent | ff868710ce0378664d89f63411eb1f9b75dc1781 (diff) | |
fix option
| -rw-r--r-- | xmake/core/base/option.lua | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/xmake/core/base/option.lua b/xmake/core/base/option.lua index d258a1451..9c750c30b 100644 --- a/xmake/core/base/option.lua +++ b/xmake/core/base/option.lua @@ -119,7 +119,7 @@ function option.init(menu) end -- not found? - if not context.taskname or not menu[context.taskname] then + if xmake.in_main_thread() and (not context.taskname or not menu[context.taskname]) then option.show_main() return false, "invalid task: " .. xmake._COMMAND end @@ -314,21 +314,12 @@ end function option.taskmenu(task) assert(option._MENU) - -- the current task task = task or option.taskname() or "main" - - -- get the task menu local taskmenu = option._MENU[task] if type(taskmenu) == "function" then - - -- load this task menu taskmenu = taskmenu() - - -- save this task menu option._MENU[task] = taskmenu end - - -- get it return taskmenu end |
