fix(cli): doom upgrade: ensure upgrade remote is deleted

It seems the temporary branch that 'doom upgrade' creates is sometimes
left over after a 'doom upgrade', preventing the next 'git fetch' from
completing.

Ref: #7771
This commit is contained in:
Henrik Lissner 2024-03-28 09:43:43 -04:00
parent b443371981
commit 544e579c44
No known key found for this signature in database
GPG key ID: B60957CA074D39A3

View file

@ -99,6 +99,8 @@ following shell commands:
(sh! "git" "reset" "--hard" (format "origin/%s" branch))
(sh! "git" "clean" "-ffd")))
;; In case of leftover state from a partial/incomplete 'doom upgrade'
(sh! "git" "branch" "-D" target-remote)
(sh! "git" "remote" "remove" doom-upgrade-remote)
(unwind-protect
(let (result)