summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/core/package/package.lua2
-rw-r--r--xmake/modules/private/xrepo/action/env.lua2
2 files changed, 2 insertions, 2 deletions
diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua
index 20332fbd7..5920dacd4 100644
--- a/xmake/core/package/package.lua
+++ b/xmake/core/package/package.lua
@@ -1093,7 +1093,7 @@ function _instance:envs()
if path.is_absolute(value) then
table.insert(newvalues, value)
else
- table.insert(newvalues, path.normalize(path.join(self:installdir(), value)))
+ table.insert(newvalues, path.normalize(path.join(self:installdir({readonly = true}), value)))
end
end
values = newvalues
diff --git a/xmake/modules/private/xrepo/action/env.lua b/xmake/modules/private/xrepo/action/env.lua
index 21b77211e..e6263151c 100644
--- a/xmake/modules/private/xrepo/action/env.lua
+++ b/xmake/modules/private/xrepo/action/env.lua
@@ -176,7 +176,7 @@ function _package_addenvs(envs, instance)
end
-- add run envs, e.g. PATH, LD_LIBRARY_PATH, DYLD_LIBRARY_PATH
- local installdir = instance:installdir()
+ local installdir = instance:installdir({readonly = true})
for name, values in pairs(instance:envs()) do
_addenvs(envs, name, table.unpack(table.wrap(values)))
end