aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Harrison <adamdharrison@gmail.com>2024-02-25 15:43:58 -0500
committerAdam Harrison <adamdharrison@gmail.com>2024-02-25 15:43:58 -0500
commitf264efbee31fbc104a48c41d03fea90fe42eec82 (patch)
tree41636384c9e1665613cc2d3d15bc3ac6220fe829
parent59af3e691bc5d0a35df4fef65a1d98b29454b612 (diff)
downloadlite-xl-plugin-manager-f264efbee31fbc104a48c41d03fea90fe42eec82.tar.gz
lite-xl-plugin-manager-f264efbee31fbc104a48c41d03fea90fe42eec82.zip
Added in chcek to ensure that we don't try to double-install dependencies.
-rw-r--r--src/lpm.lua12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/lpm.lua b/src/lpm.lua
index d661e42..a84ee7c 100644
--- a/src/lpm.lua
+++ b/src/lpm.lua
@@ -1369,8 +1369,11 @@ function Bottle:construct()
else
common.copy(self.lite_xl.datadir_path, self.local_path .. PATHSEP .. "data")
end
+ local installing = {}
for i,addon in ipairs(self.addons) do
- addon:install(self)
+ if not installing[addon.id] then
+ addon:install(self, installing)
+ end
end
-- atomically move things
common.rmrf(local_path)
@@ -1790,7 +1793,12 @@ local function lpm_install(type, ...)
end
end
if #to_install == 0 and repo_only == true then error("no addons specified for install") end
- common.each(to_install, function(e) e:install(system_bottle) end)
+ local installing = {}
+ common.each(to_install, function(e)
+ if not installing[e.id] then
+ e:install(system_bottle, installing)
+ end
+ end)
settings.installed = common.concat(settings.installed, to_explicitly_install)
lpm_settings_save()
end