diff options
| author | ruki <[email protected]> | 2026-08-08 18:31:55 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2026-08-09 18:25:42 +0800 |
| commit | 53075cd271268c1931a41648a92891c362f2483a (patch) | |
| tree | 663735ec08e713b76fc0f8994d4f1eed80e36152 /xmake/core/base/task.lua | |
| parent | 73a790f3c4810755921350c61cf84d6504a30297 (diff) | |
add addon module
Diffstat (limited to 'xmake/core/base/task.lua')
| -rw-r--r-- | xmake/core/base/task.lua | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/xmake/core/base/task.lua b/xmake/core/base/task.lua index 2488665f5..e8d2441b9 100644 --- a/xmake/core/base/task.lua +++ b/xmake/core/base/task.lua @@ -28,6 +28,7 @@ local string = require("base/string") local global = require("base/global") local hashset = require("base/hashset") local interpreter = require("base/interpreter") +local addon = require("package/addon") local sandbox = require("sandbox/sandbox") local config = require("project/config") local sandbox_os = require("sandbox/modules/os") @@ -89,12 +90,11 @@ function task._directories() path.join(os.programdir(), "actions")} -- add the plugins of the installed addons, e.g. ~/.xmake/addons/<name>/<version>/plugins - local addonsdir = path.join(global.directory(), "addons") - if os.isdir(addonsdir) then - for _, plugindir in ipairs(os.dirs(path.join(addonsdir, "*", "*", "plugins"))) do - table.insert(dirs, plugindir) - end - end + -- + -- we get them from the addons registry file directly, + -- so we do not need to scan the whole addons directory on startup + -- + table.join2(dirs, addon.payloads("plugins")) local plugindirs = os.getenv("XMAKE_PLUGIN_DIRS") if plugindirs then |
