summaryrefslogtreecommitdiff
path: root/xmake/core/base/scopeinfo.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2023-12-07 22:57:36 +0800
committerruki <[email protected]>2023-12-07 22:57:36 +0800
commitac250ea4a35ea91149771ec864bd3833b1744aef (patch)
tree315c9d05772c422c07c5ebd2d17570b581b5b2f6 /xmake/core/base/scopeinfo.lua
parentb8530e786b07ae81445b9fdacdd9a97e97511c83 (diff)
fix #4428
Diffstat (limited to 'xmake/core/base/scopeinfo.lua')
-rw-r--r--xmake/core/base/scopeinfo.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/xmake/core/base/scopeinfo.lua b/xmake/core/base/scopeinfo.lua
index 68d87706b..a7bbb4a19 100644
--- a/xmake/core/base/scopeinfo.lua
+++ b/xmake/core/base/scopeinfo.lua
@@ -239,7 +239,10 @@ function _instance:_api_add_groups(name, ...)
values = table.join(table.unpack(values))
-- save values
- scope[name] = scope[name] or {}
+ --
+ -- @note maybe scope[name] has been unwrapped, we need wrap it first
+ -- https://github.com/xmake-io/xmake/issues/4428
+ scope[name] = table.wrap(scope[name])
table.wrap_lock(values)
table.insert(scope[name], values)
scope[name] = self:_api_handle(name, scope[name])