summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/core/package/package.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua
index b258c4e33..f6d7963b7 100644
--- a/xmake/core/package/package.lua
+++ b/xmake/core/package/package.lua
@@ -1766,7 +1766,8 @@ function _instance:script(name, generic)
local scope = getfenv(result)
if scope then
for _, modulename in ipairs(table.wrap(self:get("imports"))) do
- scope[sandbox_module.name(modulename)] = sandbox_module.import(modulename, {anonymous = true})
+ scope[sandbox_module.name(modulename)] = sandbox_module.import(modulename, {
+ rootdir = self:scriptdir(), anonymous = true})
end
end
end