summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2025-09-17 21:43:45 +0800
committerGitHub <[email protected]>2025-09-17 21:43:45 +0800
commit2d69c10c4fb91ee619fff564c65e2b4119690368 (patch)
tree5b2ae92e3a668e274cc52d642ccd22155b0a529f
parentd605ad1f7d0ef8e57cb918bada176676599fb6b2 (diff)
parent1cdf616038be5c64069b82e4d7cab50741f1f212 (diff)
Merge pull request #6822 from Shiffted/fix_repo_cache
Prioritize envs over repo cache
-rw-r--r--xmake/core/sandbox/modules/import/core/package/repository.lua24
1 files changed, 12 insertions, 12 deletions
diff --git a/xmake/core/sandbox/modules/import/core/package/repository.lua b/xmake/core/sandbox/modules/import/core/package/repository.lua
index f5a3110ee..73b56a231 100644
--- a/xmake/core/sandbox/modules/import/core/package/repository.lua
+++ b/xmake/core/sandbox/modules/import/core/package/repository.lua
@@ -114,12 +114,12 @@ function sandbox_core_package_repository.repositories(is_global)
end
-- add artifacts urls
- local artifacts_urls = localcache.cache("repository"):get("artifacts_urls")
- if not artifacts_urls then
- local binary_repo = os.getenv("XMAKE_BINARY_REPO")
- if binary_repo then
- artifacts_urls = {binary_repo}
- else
+ local artifacts_urls = os.getenv("XMAKE_BINARY_REPO")
+ if artifacts_urls then
+ artifacts_urls = {artifacts_urls}
+ else
+ artifacts_urls = localcache.cache("repository"):get("artifacts_urls")
+ if not artifacts_urls then
artifacts_urls = {"https://github.com/xmake-mirror/build-artifacts.git",
"https://gitlab.com/xmake-mirror/build-artifacts.git",
"https://gitee.com/xmake-mirror/build-artifacts.git"}
@@ -140,12 +140,12 @@ function sandbox_core_package_repository.repositories(is_global)
end
-- add main urls
- local mainurls = localcache.cache("repository"):get("mainurls")
- if not mainurls then
- local mainrepo = os.getenv("XMAKE_MAIN_REPO")
- if mainrepo then
- mainurls = {mainrepo}
- else
+ local mainurls = os.getenv("XMAKE_MAIN_REPO")
+ if mainurls then
+ mainurls = {mainurls}
+ else
+ mainurls = localcache.cache("repository"):get("mainurls")
+ if not mainurls then
mainurls = {"https://github.com/xmake-io/xmake-repo.git",
"https://gitlab.com/tboox/xmake-repo.git",
"https://gitee.com/tboox/xmake-repo.git"}