From 237e520aadeb351dde886915d5369c7424aff7c5 Mon Sep 17 00:00:00 2001 From: ruki Date: Sat, 4 May 2019 00:46:07 +0800 Subject: improve to download package --- xmake/actions/require/impl/package.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'xmake/actions/require/impl/package.lua') 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' -- cgit v1.3.1