summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2021-08-06 13:30:15 +0800
committerGitHub <[email protected]>2021-08-06 13:30:15 +0800
commit776f5e79c7396497ad0bb2f45cf939f5d4f9ddca (patch)
treedd5ac748d9e51d5ea8f58cfce6127d5a02659aaf
parenta959af20d2a34038efb13053c112ef1d55084081 (diff)
Update package.lua
-rw-r--r--xmake/core/package/package.lua11
1 files changed, 8 insertions, 3 deletions
diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua
index 28473c2bf..fefa4eb17 100644
--- a/xmake/core/package/package.lua
+++ b/xmake/core/package/package.lua
@@ -255,12 +255,17 @@ function _instance:artifacts_set(artifacts_info)
if not manifest then
os.raise("package(%s): load manifest.txt failed when installing artifacts!", package:displayname())
end
- local vars = manifest.vars
- if vars then
- for k, v in pairs(vars) do
+ if manifest.vars then
+ for k, v in pairs(manifest.vars) do
package:set(k, v)
end
end
+ if manifest.envs then
+ local envs = self:envs()
+ for k, v in pairs(manifest.envs) do
+ envs[k] = v
+ end
+ end
end)
self._IS_PRECOMPILED = true
end