diff options
| author | ruki <[email protected]> | 2020-05-25 22:48:03 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-05-25 10:48:21 +0800 |
| commit | 187f0a4648d0ffadcb8d80b3481b570af9b996b9 (patch) | |
| tree | 5e7ec5470c9a5aeeb57b90040679ba0019ac3d8a /xmake/core/base/scopeinfo.lua | |
| parent | bca5559faa5c0d71f286aa95b070eb99dc186042 (diff) | |
fix interpreter
Diffstat (limited to 'xmake/core/base/scopeinfo.lua')
| -rw-r--r-- | xmake/core/base/scopeinfo.lua | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/xmake/core/base/scopeinfo.lua b/xmake/core/base/scopeinfo.lua index c8bd2fec7..350d2ef95 100644 --- a/xmake/core/base/scopeinfo.lua +++ b/xmake/core/base/scopeinfo.lua @@ -173,9 +173,6 @@ function _instance:_api_set_keyvalues(name, key, ...) extra_config = nil end - -- expand values if only one - values = table.unwrap(values) - -- save values to "name" scope[name] = scope[name] or {} scope[name][key] = self:_api_handle(values) @@ -213,12 +210,13 @@ function _instance:_api_add_keyvalues(name, key, ...) extra_config = nil end - -- expand values if only one - values = table.unwrap(values) - -- save values to "name" scope[name] = scope[name] or {} - scope[name][key] = self:_api_handle(table.join2(table.wrap(scope[name][key]), values)) + if scope[name][key] == nil then + scope[name][key] = self:_api_handle(values) + else + scope[name][key] = self:_api_handle(table.join2(table.wrap(scope[name][key]), values)) + end -- save values to "name.key" local name_key = name .. "." .. key |
