diff options
| author | ruki <[email protected]> | 2026-01-11 22:39:18 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2026-01-11 22:39:18 +0800 |
| commit | d1f4de4fe9450980b7098f3aa2598ba7e964aaf5 (patch) | |
| tree | 2c3761391ef8b5bb2dfdd0b6c0f3866392cbbb0e /xmake/core/package/package.lua | |
| parent | d2f430a096e778a1819293e89281da8ce1c2d661 (diff) | |
improve add_imports for package
Diffstat (limited to 'xmake/core/package/package.lua')
| -rw-r--r-- | xmake/core/package/package.lua | 3 |
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 |
