summaryrefslogtreecommitdiff
path: root/xmake/core/package/package.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2024-06-04 09:13:58 +0800
committerruki <[email protected]>2024-06-04 09:13:58 +0800
commit0f43f1c1503410ad099420954e6f4a701e885f60 (patch)
treecb983808a894de1db38d0b46575cc8afa00bd362 /xmake/core/package/package.lua
parentc1781dc638853e65f86261f3a7c2eede7044eb29 (diff)
improve package versions
Diffstat (limited to 'xmake/core/package/package.lua')
-rw-r--r--xmake/core/package/package.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua
index d99ef2d0f..092ba3477 100644
--- a/xmake/core/package/package.lua
+++ b/xmake/core/package/package.lua
@@ -1338,8 +1338,12 @@ function _instance:_versions_list()
local versionfiles = self:get("versionfiles")
if versionfiles then
for _, versionfile in ipairs(table.wrap(versionfiles)) do
- if not os.isfile(versionfile) then
- versionfile = path.join(self:scriptdir(), versionfile)
+ if not path.is_absolute(versionfile) then
+ local subpath = versionfile
+ versionfile = path.join(self:scriptdir(), subpath)
+ if not os.isfile(versionfile) then
+ versionfile = path.join(self:base():scriptdir(), subpath)
+ end
end
if os.isfile(versionfile) then
local list = io.readfile(versionfile)