Skip to content

Commit

Permalink
fix(cli): switch to master on upgrade (doomemacs#6001)
Browse files Browse the repository at this point in the history
Make master branch accessible before trying to use it.

Fix: doomemacs#5999
  • Loading branch information
maestrogerardo authored Jan 14, 2022
1 parent 655fb29 commit 35865ef
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/cli/upgrade.el
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ following shell commands:
(print! (info "Switching to master branch"))
(let ((remote
(cdr (doom-call-process "git" "config" "--get" "branch.develop.remote"))))
(doom-call-process "git" "config" (format "remote.%s.fetch" remote) (format "+refs/heads/*:refs/remotes/%s/*" remote))
(doom-call-process "git" "fetch" "--append" remote "master")
(doom-call-process "git" "checkout" "--track" (format "%s/master" remote))
(print! (info "Reloading Doom Emacs"))
(throw 'exit (list "doom" "upgrade" (if force-p "-f"))))))
Expand Down

0 comments on commit 35865ef

Please sign in to comment.