Fix #4249: doom/reload when bin/doom path has spaces

This commit is contained in:
Henrik Lissner 2020-11-11 00:25:04 -05:00
parent 3bdb9ad6c0
commit fee4de8b24
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -122,7 +122,7 @@ imported into Emacs."
(when IS-WINDOWS
(user-error "Cannot reload envvar file from within Emacs on Windows, run it from cmd.exe"))
(doom--if-compile
(format "%s -ic '%s env%s'"
(format "%s -ic '%S env%s'"
(string-trim
(shell-command-to-string
(format "getent passwd %S | cut -d: -f7"
@ -137,6 +137,6 @@ imported into Emacs."
(defun doom/upgrade ()
"Run 'doom upgrade' then prompt to restart Emacs."
(interactive)
(doom--if-compile (format "%s -y upgrade" doom-bin)
(doom--if-compile (format "%S -y upgrade" doom-bin)
(when (y-or-n-p "You must restart Emacs for the upgrade to take effect.\n\nRestart Emacs?")
(doom/restart-and-restore))))