From 589dbc869cd36aa87efaadbd61264f930e53ff6c Mon Sep 17 00:00:00 2001 From: Adam Harrison Date: Thu, 29 Feb 2024 23:34:49 -0500 Subject: Possibly addressed issue. --- src/lpm.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') 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() -- cgit v1.2.3