aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Harrison <adamdharrison@gmail.com>2022-12-03 14:02:19 -0500
committerAdam Harrison <adamdharrison@gmail.com>2022-12-03 14:02:19 -0500
commit9afefc5f58f8d00926aa60a56a5672b739fa30b4 (patch)
treee47252a86fbe3f664177ff726e676fa43758c6a5
parent0da6a613916f921f85f25bc81f80ae817f93f469 (diff)
downloadlite-xl-plugin-manager-9afefc5f58f8d00926aa60a56a5672b739fa30b4.tar.gz
lite-xl-plugin-manager-9afefc5f58f8d00926aa60a56a5672b739fa30b4.zip
Fixed multiple installs.
-rw-r--r--src/lpm.lua2
-rw-r--r--t/run.lua1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/lpm.lua b/src/lpm.lua
index 9b894c8..ddbb1f5 100644
--- a/src/lpm.lua
+++ b/src/lpm.lua
@@ -1292,7 +1292,7 @@ local function lpm_install(...)
if name == "lite-xl" then
lpm_lite_xl_install(version)
else
- local plugins = { system_bottle:get_plugin(name, version, { mod_version = system_bottle.lite_xl.mod_version }) }
+ local plugins = common.grep({ system_bottle:get_plugin(name, version, { mod_version = system_bottle.lite_xl.mod_version }) }, function(e) return not e:is_installed(system_bottle) end)
if #plugins == 0 then error("can't find plugin " .. name .. " mod-version: " .. (system_bottle.lite_xl.mod_version or 'any')) end
for j,v in ipairs(plugins) do v:install(system_bottle) end
end
diff --git a/t/run.lua b/t/run.lua
index d99e417..2de689b 100644
--- a/t/run.lua
+++ b/t/run.lua
@@ -394,6 +394,7 @@ local function run_tests(tests, arg)
local failed = false
xpcall(v, function(err)
print("[FAIL]: " .. err)
+ print(debug.traceback())
print()
print()
print("Last Command: " .. last_command)