From a55b5a4514b8fa04e0bda8d426358a4143cb01e3 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 9 Nov 2019 11:06:06 -0500 Subject: [PATCH] Fix void-function doom-sh error in 'doom upgrade' #2034 --- core/cli/upgrade.el | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/core/cli/upgrade.el b/core/cli/upgrade.el index 9244c293b..dad07e387 100644 --- a/core/cli/upgrade.el +++ b/core/cli/upgrade.el @@ -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))))))