diff options
| author | ruki <[email protected]> | 2026-08-14 23:28:20 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2026-08-14 23:28:20 +0800 |
| commit | a79cf74f920c088528d66a67a59b3d8eaa1d4f7a (patch) | |
| tree | dca4cb0ca1fd210e04e8c59ffd9ab8c410747c1f /xmake/core/package/addon.lua | |
| parent | 6c246c12a09524780e5bfdc53bc27a892e4793a9 (diff) | |
autofetch addons
Diffstat (limited to 'xmake/core/package/addon.lua')
| -rw-r--r-- | xmake/core/package/addon.lua | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/xmake/core/package/addon.lua b/xmake/core/package/addon.lua index 586a3ea15..6d56205fd 100644 --- a/xmake/core/package/addon.lua +++ b/xmake/core/package/addon.lua @@ -656,6 +656,17 @@ function addon.remove(name, opt) return true end +-- reload the addons registry and the caches which are built from it +-- +-- @note we need it if the addons have been installed by another process, +-- e.g. the addons which a project declares, @see core/project/project.lua +-- +function addon.reload() + addon._ADDONS = nil + addon._MANIFESTS = nil + addon._GLOBALMODULES = nil +end + -- rescan the install directory and rebuild the registry -- -- it's only used to repair the registry file, e.g. the user removed some addon directories manually |
