summaryrefslogtreecommitdiff
path: root/xmake/actions/require/impl/package.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2019-05-04 00:46:07 +0800
committerruki <[email protected]>2019-05-03 22:36:44 +0800
commit237e520aadeb351dde886915d5369c7424aff7c5 (patch)
tree7770f780a86be528ea1e754fa635a566aaca3045 /xmake/actions/require/impl/package.lua
parent5ed784324f22c0c2d899a321341e0c1052fdef15 (diff)
improve to download package
Diffstat (limited to 'xmake/actions/require/impl/package.lua')
-rw-r--r--xmake/actions/require/impl/package.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/xmake/actions/require/impl/package.lua b/xmake/actions/require/impl/package.lua
index 64a9f2880..56f1b9f7e 100644
--- a/xmake/actions/require/impl/package.lua
+++ b/xmake/actions/require/impl/package.lua
@@ -580,15 +580,18 @@ function _install_packages(packages_install, packages_download)
end
-- download this package first
+ local downloaded = true
if packages_download[tostring(package)] then
packages_downloading[index] = package
- action.download(package)
+ downloaded = action.download(package)
packages_downloading[index] = nil
end
-- install this package
packages_installing[index] = package
- action.install(package)
+ if downloaded then
+ action.install(package)
+ end
packages_installing[index] = nil
-- mark this group as 'installed' or 'failed'