diff options
-rw-r--r-- | manifest.json | 2 | ||||
-rw-r--r-- | src/lpm.lua | 7 |
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() |