summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2021-09-01 15:09:21 +0800
committerGitHub <[email protected]>2021-09-01 15:09:21 +0800
commitb9d4b06cb993b737a28d59561c3b5b4002a429f9 (patch)
tree504e11d739f8cc0becde8514bd8d0fc3ea5ab800
parent671cabb77b5421fae4fabecdfe9d0df4adf0ddb8 (diff)
Update download.lua
-rw-r--r--xmake/modules/private/action/require/impl/actions/download.lua11
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
{