summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2021-02-21 18:13:50 +0800
committerruki <[email protected]>2021-02-21 18:13:50 +0800
commit5e1a9ad514f20214515815e14ee7d92347d0ced4 (patch)
treef66d9c7d3d679cae54d3e5c64c971eca4dfafc88
parent8f3845eb923737c9cb52b12adc79e8dded86e829 (diff)
fix should install for package
-rw-r--r--xmake/modules/private/action/require/impl/install_packages.lua2
-rw-r--r--xmake/modules/private/action/require/install.lua2
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 08b54a80d..2e56ad3a4 100644
--- a/xmake/modules/private/action/require/impl/install_packages.lua
+++ b/xmake/modules/private/action/require/impl/install_packages.lua
@@ -404,7 +404,7 @@ end
-- should install?
function _should_install(instance)
- if instance:parents() then
+ if instance:exists() and 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
if not parent:exists() then
diff --git a/xmake/modules/private/action/require/install.lua b/xmake/modules/private/action/require/install.lua
index b93bc02fe..c9e24d21e 100644
--- a/xmake/modules/private/action/require/install.lua
+++ b/xmake/modules/private/action/require/install.lua
@@ -29,7 +29,7 @@ import("private.action.require.impl.utils.get_requires")
-- should install?
function _should_install(instance)
- if instance:parents() then
+ if instance:exists() and 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
if not parent:exists() then