summaryrefslogtreecommitdiff
path: root/xmake
diff options
context:
space:
mode:
authorruki <[email protected]>2021-03-31 22:39:53 +0800
committerruki <[email protected]>2021-03-31 22:39:53 +0800
commit4940fa6a0967b3e4840eeefb057cff2ffd3d7e7b (patch)
tree1ec552a6a2a1289e57781ed30820cb8030be6146 /xmake
parent012694c97ae89bf4ddaf17f1c336f040b0286109 (diff)
fix optional dep
Diffstat (limited to 'xmake')
-rw-r--r--xmake/modules/private/action/require/impl/install_packages.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/xmake/modules/private/action/require/impl/install_packages.lua b/xmake/modules/private/action/require/impl/install_packages.lua
index 096190945..efc0c73a9 100644
--- a/xmake/modules/private/action/require/impl/install_packages.lua
+++ b/xmake/modules/private/action/require/impl/install_packages.lua
@@ -186,7 +186,7 @@ function _install_packages(packages_install, packages_download, installdeps)
local dep_not_found = nil
for _, dep in pairs(installdeps[tostring(pkg)]) do
local installed = packages_installed[tostring(dep)]
- if installed == false or (installed == nil and not dep:exists()) then
+ if installed == false or (installed == nil and not dep:exists() and not dep:is_optional()) then
ready = false
dep_not_found = dep
break