diff options
author | Adam Harrison <adamdharrison@gmail.com> | 2024-02-29 23:34:49 -0500 |
---|---|---|
committer | Adam Harrison <adamdharrison@gmail.com> | 2024-02-29 23:34:49 -0500 |
commit | 589dbc869cd36aa87efaadbd61264f930e53ff6c (patch) | |
tree | d7675e8ff9c45f3212bac7695f41e23f93c6405b /src/lpm.lua | |
parent | 3c387039330226884c8d8726be176205daafb790 (diff) | |
download | lite-xl-plugin-manager-589dbc869cd36aa87efaadbd61264f930e53ff6c.tar.gz lite-xl-plugin-manager-589dbc869cd36aa87efaadbd61264f930e53ff6c.zip |
Possibly addressed issue.
Diffstat (limited to 'src/lpm.lua')
-rw-r--r-- | src/lpm.lua | 7 |
1 files changed, 6 insertions, 1 deletions
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() |