From 0d918cd313d6df1a07bebaff687d744ef5522e50 Mon Sep 17 00:00:00 2001 From: ruki Date: Sun, 21 Feb 2021 18:18:38 +0800 Subject: fix should install for package again --- xmake/modules/private/action/require/impl/install_packages.lua | 4 ++-- xmake/modules/private/action/require/install.lua | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/xmake/modules/private/action/require/impl/install_packages.lua b/xmake/modules/private/action/require/impl/install_packages.lua index 2e56ad3a4..765b71c3d 100644 --- a/xmake/modules/private/action/require/impl/install_packages.lua +++ b/xmake/modules/private/action/require/impl/install_packages.lua @@ -404,9 +404,9 @@ end -- should install? function _should_install(instance) - if instance:exists() and instance:parents() then + 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 ipairs(instance:parents()) do + for _, parent in pairs(instance:parents()) do if not parent:exists() then return true end diff --git a/xmake/modules/private/action/require/install.lua b/xmake/modules/private/action/require/install.lua index c9e24d21e..7d6ec3556 100644 --- a/xmake/modules/private/action/require/install.lua +++ b/xmake/modules/private/action/require/install.lua @@ -29,9 +29,9 @@ import("private.action.require.impl.utils.get_requires") -- should install? function _should_install(instance) - if instance:exists() and instance:parents() then + 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 ipairs(instance:parents()) do + for _, parent in pairs(instance:parents()) do if not parent:exists() then return true end -- cgit v1.3.1