aboutsummaryrefslogtreecommitdiff
path: root/src/lpm.lua
diff options
context:
space:
mode:
authorAdam Harrison <adamdharrison@gmail.com>2024-02-25 17:33:25 -0500
committerAdam Harrison <adamdharrison@gmail.com>2024-02-25 17:33:25 -0500
commit82b10a02fa22ac3458804758df7e44d428f01e21 (patch)
tree77058ccc5282f2354c07bcd5c8649d204a2c6cdc /src/lpm.lua
parent0833bb28f558cbea425d47d41e1ae1eaed483b04 (diff)
downloadlite-xl-plugin-manager-PR/masking.tar.gz
lite-xl-plugin-manager-PR/masking.zip
Added in warnings when we won't install or unisntall things due to mask.PR/masking
Diffstat (limited to 'src/lpm.lua')
-rw-r--r--src/lpm.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lpm.lua b/src/lpm.lua
index 885b699..d745cc0 100644
--- a/src/lpm.lua
+++ b/src/lpm.lua
@@ -777,7 +777,7 @@ end
function Addon:install(bottle, installing)
- if MASK[self.id] then return end
+ if MASK[self.id] then if not installing[self.id] then log_warning("won't install masked addon " .. self.id) end installing[self.id] = true return end
if self:is_installed(bottle) and not REINSTALL then error("addon " .. self.id .. " is already installed") return end
if self:is_stub() then self:unstub() end
if self.inaccessible then error("addon " .. self.id .. " is inaccessible: " .. self.inaccessible) end
@@ -950,7 +950,7 @@ end
function Addon:uninstall(bottle, uninstalling)
- if MASK[self.id] then return end
+ if MASK[self.id] then if not uninstalling[self.id] then log_warning("won't uninstall masked addon " .. self.id) end uninstalling[self.id] = true return end
local install_path = self:get_install_path(bottle)
if self:is_core(bottle) then error("can't uninstall " .. self.id .. "; is a core addon") end
local orphans = common.sort(common.grep(self:get_orphaned_dependencies(bottle), function(e) return not uninstalling or not uninstalling[e.id] end), function(a, b) return a.id < b.id end)