aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdam Harrison <adamdharrison@gmail.com>2023-11-27 14:33:01 -0500
committerAdam Harrison <adamdharrison@gmail.com>2023-11-27 14:33:01 -0500
commit903ecb1d0ffa5e5b8c9942d455ce22539a625571 (patch)
tree4bbf0de1a2351ec59c174d38ef351e1ae8186848 /src
parent31b01534626dc4c93e6142183786fb58f8a7dde6 (diff)
downloadlite-xl-plugin-manager-903ecb1d0ffa5e5b8c9942d455ce22539a625571.tar.gz
lite-xl-plugin-manager-903ecb1d0ffa5e5b8c9942d455ce22539a625571.zip
Invalidate cache in appropriate places.
Diffstat (limited to 'src')
-rw-r--r--src/lpm.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lpm.lua b/src/lpm.lua
index 1a08f64..f273688 100644
--- a/src/lpm.lua
+++ b/src/lpm.lua
@@ -1704,6 +1704,7 @@ local function lpm_lite_xl_run(version, ...)
local str = arguments[i]
if is_argument_repo(str) then
table.insert(repositories, 1, Repository.url(str):add(AUTO_PULL_REMOTES))
+ system_bottle:invalidate_cache()
else
local id, version = common.split(":", str)
local potentials = { system_bottle:get_addon(id, version, { mod_version = lite_xl.mod_version }) }
@@ -1739,6 +1740,7 @@ local function lpm_install(type, ...)
else
if is_argument_repo(identifier) then
table.insert(repositories, 1, Repository.url(identifier):add(AUTO_PULL_REMOTES))
+ system_bottle:invalidate_cache()
else
local potential_addons = { system_bottle:get_addon(id, version, { mod_version = system_bottle.lite_xl.mod_version, type = type }) }
local addons = common.grep(potential_addons, function(e) return e:is_installable(system_bottle) and (not e:is_installed(system_bottle) or REINSTALL) end)
@@ -1854,6 +1856,7 @@ local function lpm_unstub(type, ...)
if not identifier then error('unrecognized identifier ' .. identifier) end
if is_argument_repo(identifier) then
table.insert(repositories, 1, Repository.url(identifier):add(AUTO_PULL_REMOTES))
+ system_bottle:invalidate_cache()
else
local potential_addons = { system_bottle:get_addon(identifier, nil, { mod_version = system_bottle.lite_xl.mod_version }) }
addons = common.grep(potential_addons, function(e) return e:is_stub() end)