From 4ef736be23496aac5a68beb3c4f36e94d5c5b3fd Mon Sep 17 00:00:00 2001 From: ruki Date: Sun, 21 Feb 2021 18:24:03 +0800 Subject: improve should_install --- xmake/modules/private/action/require/impl/install_packages.lua | 2 +- xmake/modules/private/action/require/install.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xmake/modules/private/action/require/impl/install_packages.lua b/xmake/modules/private/action/require/impl/install_packages.lua index 765b71c3d..48f159313 100644 --- a/xmake/modules/private/action/require/impl/install_packages.lua +++ b/xmake/modules/private/action/require/impl/install_packages.lua @@ -407,7 +407,7 @@ function _should_install(instance) if instance:parents() then -- if all the packages that depend on it already exist, then there is no need to install it for _, parent in pairs(instance:parents()) do - if not parent:exists() then + if _should_install(parent) and not parent:exists() then return true end end diff --git a/xmake/modules/private/action/require/install.lua b/xmake/modules/private/action/require/install.lua index 7d6ec3556..5477d999d 100644 --- a/xmake/modules/private/action/require/install.lua +++ b/xmake/modules/private/action/require/install.lua @@ -32,7 +32,7 @@ function _should_install(instance) if instance:parents() then -- if all the packages that depend on it already exist, then there is no need to install it for _, parent in pairs(instance:parents()) do - if not parent:exists() then + if _should_install(parent) and not parent:exists() then return true end end -- cgit v1.3.1