mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
Fix #5071: don't always emit 128 exit code
Otherwise it always tries to execute /tmp/doom.sh, which won't exist on certain code paths.
This commit is contained in:
17
bin/doom
17
bin/doom
@ -76,8 +76,8 @@
|
|||||||
(let ((inhibit-message t))
|
(let ((inhibit-message t))
|
||||||
(require 'cl)
|
(require 'cl)
|
||||||
(unless site-run-file
|
(unless site-run-file
|
||||||
(setq site-run-file "site-start")
|
(let ((site-run-file "site-start")
|
||||||
(let ((verbose (or (getenv "DEBUG") init-file-debug))
|
(verbose (or (getenv "DEBUG") init-file-debug))
|
||||||
(tail load-path)
|
(tail load-path)
|
||||||
(lispdir (expand-file-name "../lisp" data-directory))
|
(lispdir (expand-file-name "../lisp" data-directory))
|
||||||
dir)
|
dir)
|
||||||
@ -141,7 +141,8 @@
|
|||||||
" rm -f " (shell-quote-argument script) "\n "
|
" rm -f " (shell-quote-argument script) "\n "
|
||||||
(cond ((eq command :restart) "$@")
|
(cond ((eq command :restart) "$@")
|
||||||
((stringp command) command)
|
((stringp command) command)
|
||||||
((string-join
|
((listp command)
|
||||||
|
(string-join
|
||||||
(if (listp (car-safe command))
|
(if (listp (car-safe command))
|
||||||
(cl-loop for line in (doom-enlist command)
|
(cl-loop for line in (doom-enlist command)
|
||||||
collect (mapconcat #'shell-quote-argument (remq nil line) " "))
|
collect (mapconcat #'shell-quote-argument (remq nil line) " "))
|
||||||
@ -159,9 +160,7 @@
|
|||||||
(shell-quote-argument (match-string 2 env)))))
|
(shell-quote-argument (match-string 2 env)))))
|
||||||
(format "PATH=\"%s%s$PATH\" \\\n" (concat doom-emacs-dir "bin/") path-separator)
|
(format "PATH=\"%s%s$PATH\" \\\n" (concat doom-emacs-dir "bin/") path-separator)
|
||||||
"_postscript $@\n"))
|
"_postscript $@\n"))
|
||||||
(set-file-modes script #o600))))
|
(set-file-modes script #o600)t
|
||||||
|
;; Error code 128 is special: it means run the post-script after this
|
||||||
;; Error code 128 is special: it means run the post-script after this
|
;; session ends.
|
||||||
;; session ends.
|
128))))))
|
||||||
128)
|
|
||||||
))
|
|
||||||
|
Reference in New Issue
Block a user