diff options
| author | ruki <[email protected]> | 2022-10-08 00:55:22 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-10-08 00:55:22 +0800 |
| commit | 3af745fe82cc5ff1627a395b184908ee6d1f6907 (patch) | |
| tree | 1cb78ddb8e3cb594f8c8445dd9f406bc94663822 /xmake/core/project/package.lua | |
| parent | 9db1c9224342114ba6b40ad0860f09ed69be0ba9 (diff) | |
fix package info
Diffstat (limited to 'xmake/core/project/package.lua')
| -rw-r--r-- | xmake/core/project/package.lua | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/xmake/core/project/package.lua b/xmake/core/project/package.lua index 388862d91..a716ae9e6 100644 --- a/xmake/core/project/package.lua +++ b/xmake/core/project/package.lua @@ -209,19 +209,17 @@ function package._cache() return localcache.cache("package") end --- load the requires info from the cache +-- load the package from the cache function package.load(name) - - -- check - assert(name) - - -- get info local info = package._cache():get(name) if info == nil then return end + return package.load_withinfo(name, info) +end - -- init package instance +-- load package from the give package info +function package.load_withinfo(name, info) local instance = table.inherit(_instance) instance._INFO = info instance._NAME = name |
