diff options
| -rw-r--r-- | xmake/modules/private/action/require/impl/actions/download.lua | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/xmake/modules/private/action/require/impl/actions/download.lua b/xmake/modules/private/action/require/impl/actions/download.lua index e4cf8f0cc..ba918e7f4 100644 --- a/xmake/modules/private/action/require/impl/actions/download.lua +++ b/xmake/modules/private/action/require/impl/actions/download.lua @@ -66,7 +66,6 @@ function _checkout(package, url, sourcedir, url_alias) local longpaths = package:policy("platform.longpaths") -- download package from branches? - url = proxy.mirror(url) or url packagedir = path.join(sourcedir .. ".tmp", package:name()) if package:branch() then @@ -104,11 +103,6 @@ function _download(package, url, sourcedir, url_alias, url_excludes) -- get package file local packagefile = url_filename(url) - -- use proxy url? - if not os.isfile(url) then - url = proxy.mirror(url) or url - end - -- get sourcehash from the given url -- -- we need not sourcehash and skip checksum to try download it directly if no version list in package() @@ -230,6 +224,11 @@ function main(package) -- filter url url = filter.handle(url, package) + -- use proxy url? + if not os.isfile(url) then + url = proxy.mirror(url) or url + end + -- download url ok = try { |
