summaryrefslogtreecommitdiff
path: root/xmake/actions/require/impl
diff options
context:
space:
mode:
authorruki <[email protected]>2018-11-09 00:33:39 +0800
committerruki <[email protected]>2018-11-08 21:21:57 +0800
commit03cd8eb7dce64295cf9ed5a11695796d23a18019 (patch)
tree3dee48b2809e2331d5136bfd2d2f6d6542a3aa31 /xmake/actions/require/impl
parentd41f7ae50ae262ed3017c3713db50b79985e28e8 (diff)
move the on_load position of pacakge
Diffstat (limited to 'xmake/actions/require/impl')
-rw-r--r--xmake/actions/require/impl/package.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/xmake/actions/require/impl/package.lua b/xmake/actions/require/impl/package.lua
index 7a5885e76..89d39d5be 100644
--- a/xmake/actions/require/impl/package.lua
+++ b/xmake/actions/require/impl/package.lua
@@ -395,6 +395,14 @@ function load_packages(requires, opt)
for _, package in ipairs(packages) do
local key = package:name() .. (package:version_str() or "")
if not unique[key] then
+
+ -- do load for package
+ local on_load = package:script("load")
+ if on_load then
+ on_load(package)
+ end
+
+ -- add package
table.insert(results, package)
unique[key] = true
end