From 2e9294e6d97a468091dace7f3f82f6c9d91e2c8f Mon Sep 17 00:00:00 2001 From: ruki Date: Sun, 12 Jan 2025 23:13:19 +0800 Subject: [PATCH] use absolute path for xrepo/includes --- xmake/modules/private/xrepo/action/download.lua | 4 +++- xmake/modules/private/xrepo/action/export.lua | 4 +++- xmake/modules/private/xrepo/action/fetch.lua | 4 +++- xmake/modules/private/xrepo/action/install.lua | 4 +++- xmake/modules/private/xrepo/action/remove.lua | 4 +++- 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/xmake/modules/private/xrepo/action/download.lua b/xmake/modules/private/xrepo/action/download.lua index db68e50b064..189d6aa8c9c 100644 --- a/xmake/modules/private/xrepo/action/download.lua +++ b/xmake/modules/private/xrepo/action/download.lua @@ -98,7 +98,9 @@ function _download_packages(packages) local rcfiles = {} local includes = option.get("includes") if includes then - table.join2(rcfiles, path.splitenv(includes)) + for _, includefile in ipairs(path.splitenv(includes)) do + table.insert(rcfiles, path.absolute(includefile)) + end end -- enter working project directory diff --git a/xmake/modules/private/xrepo/action/export.lua b/xmake/modules/private/xrepo/action/export.lua index 1b6e2e88511..af2b3562c43 100644 --- a/xmake/modules/private/xrepo/action/export.lua +++ b/xmake/modules/private/xrepo/action/export.lua @@ -92,7 +92,9 @@ function _export_packages(packages) local rcfiles = {} local includes = option.get("includes") if includes then - table.join2(rcfiles, path.splitenv(includes)) + for _, includefile in ipairs(path.splitenv(includes)) do + table.insert(rcfiles, path.absolute(includefile)) + end end -- enter working project directory diff --git a/xmake/modules/private/xrepo/action/fetch.lua b/xmake/modules/private/xrepo/action/fetch.lua index eb5abfeba53..0cf83ae0938 100644 --- a/xmake/modules/private/xrepo/action/fetch.lua +++ b/xmake/modules/private/xrepo/action/fetch.lua @@ -103,7 +103,9 @@ function _fetch_packages(packages) local rcfiles = {} local includes = option.get("includes") if includes then - table.join2(rcfiles, path.splitenv(includes)) + for _, includefile in ipairs(path.splitenv(includes)) do + table.insert(rcfiles, path.absolute(includefile)) + end end -- enter working project directory diff --git a/xmake/modules/private/xrepo/action/install.lua b/xmake/modules/private/xrepo/action/install.lua index 873c52cc020..954fa9f9476 100644 --- a/xmake/modules/private/xrepo/action/install.lua +++ b/xmake/modules/private/xrepo/action/install.lua @@ -132,7 +132,9 @@ function _install_packages(packages) local rcfiles = {} local includes = option.get("includes") if includes then - table.join2(rcfiles, path.splitenv(includes)) + for _, includefile in ipairs(path.splitenv(includes)) do + table.insert(rcfiles, path.absolute(includefile)) + end end -- enter working project directory diff --git a/xmake/modules/private/xrepo/action/remove.lua b/xmake/modules/private/xrepo/action/remove.lua index 2744da94374..21ee8b8262c 100644 --- a/xmake/modules/private/xrepo/action/remove.lua +++ b/xmake/modules/private/xrepo/action/remove.lua @@ -95,7 +95,9 @@ function _remove_packages(packages) local rcfiles = {} local includes = option.get("includes") if includes then - table.join2(rcfiles, path.splitenv(includes)) + for _, includefile in ipairs(path.splitenv(includes)) do + table.insert(rcfiles, path.absolute(includefile)) + end end -- enter working project directory