diff options
author | Adam Harrison <adamdharrison@gmail.com> | 2024-06-09 14:12:29 -0400 |
---|---|---|
committer | Adam Harrison <adamdharrison@gmail.com> | 2024-06-09 14:12:29 -0400 |
commit | 886cb4bee2fa01477da35085a9418bbeb6ce4781 (patch) | |
tree | cfe88da643e4ecdd2580e41dcfbb3293caeccddd /src | |
parent | 6e33089dff1bcc2919c51decca7471c32c83a46e (diff) | |
download | lite-xl-plugin-manager-886cb4bee2fa01477da35085a9418bbeb6ce4781.tar.gz lite-xl-plugin-manager-886cb4bee2fa01477da35085a9418bbeb6ce4781.zip |
Fix for Guldo's new issue.
Diffstat (limited to 'src')
-rw-r--r-- | src/lpm.lua | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/lpm.lua b/src/lpm.lua index 6779e95..3f07fc4 100644 --- a/src/lpm.lua +++ b/src/lpm.lua @@ -788,7 +788,15 @@ function Addon:is_core(bottle) return self.location == "core" end function Addon:is_bundled(bottle) return self.location == "bundled" end function Addon:is_installed(bottle) if self:is_core(bottle) or self:is_bundled(bottle) or not self.repository then return true end - if self.type == "meta" and self:is_explicitly_installed(bottle) then return true end + if self.type == "meta" then + if self:is_explicitly_installed(bottle) then return true end + for k, v in pairs(self.dependencies) do + if #common.grep({ bottle:get_addon(k) }, function(a) return a:is_installed(bottle) end) == 0 then + return false + end + end + return true + end local install_path = self:get_install_path(bottle) if not system.stat(install_path) then return false end if self:is_asset() then return true end |