diff options
| author | ruki <[email protected]> | 2018-09-23 23:25:03 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2018-09-23 23:25:03 +0800 |
| commit | ba4ba0bf697cfc2b95edbd53d9301bbbb3803129 (patch) | |
| tree | dd60dd6c5b663ad6299d46b1c2606775b292b27b /xmake/actions/require/action | |
| parent | d9d422c8fe2f838052fc2dd92b6801a81a515b34 (diff) | |
improve to try building
Diffstat (limited to 'xmake/actions/require/action')
| -rw-r--r-- | xmake/actions/require/action/download.lua | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/xmake/actions/require/action/download.lua b/xmake/actions/require/action/download.lua index 6833f5df1..61d64d124 100644 --- a/xmake/actions/require/action/download.lua +++ b/xmake/actions/require/action/download.lua @@ -133,7 +133,7 @@ function _urls(package) for _, url in ipairs(package:urls()) do if git.checkurl(url) then table.insert(urls[1], url) - else + elseif package:sha256(package:url_alias(url)) then table.insert(urls[2], url) end end @@ -156,8 +156,11 @@ function main(package) -- enter the working directory local oldir = os.cd(workdir) - -- download package from urls + -- get urls local urls = _urls(package) + assert(#urls > 0, "cannot get url of package(%s)", package:name()) + + -- download package from urls for idx, url in ipairs(urls) do -- get url alias |
