Fix void-function doom-sh error in 'doom upgrade' #2034
This commit is contained in:
parent
cc1bbe0b7e
commit
a55b5a4514
1 changed files with 10 additions and 10 deletions
|
@ -28,7 +28,7 @@ following shell commands:
|
|||
|
||||
(defun doom--working-tree-dirty-p (dir)
|
||||
(cl-destructuring-bind (success . stdout)
|
||||
(doom-sh "git" "status" "--porcelain" "-uno")
|
||||
(doom-call-process "git" "status" "--porcelain" "-uno")
|
||||
(if (= 0 success)
|
||||
(string-match-p "[^ \t\n]" (buffer-string))
|
||||
(error "Failed to check working tree in %s" dir))))
|
||||
|
@ -55,15 +55,15 @@ following shell commands:
|
|||
(format "Refusing to upgrade because %S has been modified." (path doom-emacs-dir))
|
||||
"Either stash/undo your changes or run 'doom upgrade -f' to discard local changes.")
|
||||
(print! (info "You have local modifications in Doom's source. Discarding them..."))
|
||||
(doom-sh "git" "reset" "--hard" (format "origin/%s" branch))
|
||||
(doom-sh "git" "clean" "-ffd")))
|
||||
(doom-call-process "git" "reset" "--hard" (format "origin/%s" branch))
|
||||
(doom-call-process "git" "clean" "-ffd")))
|
||||
|
||||
(doom-sh "git" "remote" "remove" doom-repo-remote)
|
||||
(doom-call-process "git" "remote" "remove" doom-repo-remote)
|
||||
(unwind-protect
|
||||
(progn
|
||||
(or (zerop (car (doom-sh "git" "remote" "add" doom-repo-remote doom-repo-url)))
|
||||
(or (zerop (car (doom-call-process "git" "remote" "add" doom-repo-remote doom-repo-url)))
|
||||
(error "Failed to add %s to remotes" doom-repo-remote))
|
||||
(or (zerop (car (doom-sh "git" "fetch" "--tags" doom-repo-remote branch)))
|
||||
(or (zerop (car (doom-call-process "git" "fetch" "--tags" doom-repo-remote branch)))
|
||||
(error "Failed to fetch from upstream"))
|
||||
|
||||
(let ((this-rev (vc-git--rev-parse "HEAD"))
|
||||
|
@ -79,9 +79,9 @@ following shell commands:
|
|||
|
||||
((print! (info "A new version of Doom Emacs is available!\n\n Old revision: %s (%s)\n New revision: %s (%s)\n"
|
||||
(substring this-rev 0 10)
|
||||
(cdr (doom-sh "git" "log" "-1" "--format=%cr" "HEAD"))
|
||||
(cdr (doom-call-process "git" "log" "-1" "--format=%cr" "HEAD"))
|
||||
(substring new-rev 0 10)
|
||||
(cdr (doom-sh "git" "log" "-1" "--format=%cr" target-remote))))
|
||||
(cdr (doom-call-process "git" "log" "-1" "--format=%cr" target-remote))))
|
||||
|
||||
(when (and (not auto-accept-p)
|
||||
(y-or-n-p "View the comparison diff in your browser?"))
|
||||
|
@ -96,7 +96,7 @@ following shell commands:
|
|||
(print! (start "Upgrading Doom Emacs..."))
|
||||
(print-group!
|
||||
(doom-clean-byte-compiled-files)
|
||||
(unless (and (zerop (car (doom-sh "git" "reset" "--hard" target-remote)))
|
||||
(unless (and (zerop (car (doom-call-process "git" "reset" "--hard" target-remote)))
|
||||
(equal (vc-git--rev-parse "HEAD") new-rev))
|
||||
(error "Failed to check out %s" (substring new-rev 0 10)))
|
||||
(print! (success "Finished upgrading Doom Emacs")))
|
||||
|
@ -106,4 +106,4 @@ following shell commands:
|
|||
|
||||
(print! (success "Done! Restart Emacs for changes to take effect."))))))
|
||||
(ignore-errors
|
||||
(doom-sh "git" "remote" "remove" doom-repo-remote))))))
|
||||
(doom-call-process "git" "remote" "remove" doom-repo-remote))))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue