aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Harrison <adamdharrison@gmail.com>2024-02-29 23:34:49 -0500
committerAdam Harrison <adamdharrison@gmail.com>2024-02-29 23:34:49 -0500
commit589dbc869cd36aa87efaadbd61264f930e53ff6c (patch)
treed7675e8ff9c45f3212bac7695f41e23f93c6405b
parent3c387039330226884c8d8726be176205daafb790 (diff)
downloadlite-xl-plugin-manager-589dbc869cd36aa87efaadbd61264f930e53ff6c.tar.gz
lite-xl-plugin-manager-589dbc869cd36aa87efaadbd61264f930e53ff6c.zip
Possibly addressed issue.
-rw-r--r--manifest.json2
-rw-r--r--src/lpm.lua7
2 files changed, 7 insertions, 2 deletions
diff --git a/manifest.json b/manifest.json
index 811f086..c9c04d4 100644
--- a/manifest.json
+++ b/manifest.json
@@ -52,7 +52,7 @@
{
"url": "https://github.com/lite-xl/lite-xl-plugin-manager/releases/download/latest/lpm.x86_64-android",
"arch": "x86_64-android",
- "checksum": "SKIP",
+ "checksum": "bcc79ca26399de77bbb789ad61874aa71e855ac17c593fe3dd28294bdc14159f",
"optional": true
}
],
diff --git a/src/lpm.lua b/src/lpm.lua
index 910ccf3..c52b595 100644
--- a/src/lpm.lua
+++ b/src/lpm.lua
@@ -1229,7 +1229,12 @@ function Repository:update(pull_remotes)
local manifest, remotes = self:parse_manifest()
if self.branch then
log_progress_action("Updating " .. self:url() .. "...")
- system.fetch(self.local_path, write_progress_bar, "+refs/heads/" .. self.branch .. ":refs/remotes/origin/" .. self.branch)
+ local status, err = pcall(system.fetch, self.local_path, write_progress_bar, "+refs/heads/" .. self.branch .. ":refs/remotes/origin/" .. self.branch)
+ if not status then -- see https://github.com/lite-xl/lite-xl-plugin-manager/issues/85
+ if not err:find("object not found %- no match for id") then error(err, 0) end
+ common.rmrf(self.local_path)
+ return self:fetch()
+ end
common.reset(self.local_path, self.branch, "hard")
self.manifest = nil
manifest, remotes = self:parse_manifest()