From 903ecb1d0ffa5e5b8c9942d455ce22539a625571 Mon Sep 17 00:00:00 2001 From: Adam Harrison Date: Mon, 27 Nov 2023 14:33:01 -0500 Subject: Invalidate cache in appropriate places. --- src/lpm.lua | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') 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) -- cgit v1.2.3