diff options
| author | ruki <[email protected]> | 2025-09-17 21:43:45 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-09-17 21:43:45 +0800 |
| commit | 2d69c10c4fb91ee619fff564c65e2b4119690368 (patch) | |
| tree | 5b2ae92e3a668e274cc52d642ccd22155b0a529f | |
| parent | d605ad1f7d0ef8e57cb918bada176676599fb6b2 (diff) | |
| parent | 1cdf616038be5c64069b82e4d7cab50741f1f212 (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.lua | 24 |
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"} |
