Skip to content

Commit

Permalink
Fix doomemacs#5071: don't always emit 128 exit code
Browse files Browse the repository at this point in the history
Otherwise it always tries to execute /tmp/doom.sh, which won't exist on
certain code paths.
  • Loading branch information
hlissner committed May 20, 2021
1 parent f884a5d commit ef7113d
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions bin/doom
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@
(let ((inhibit-message t))
(require 'cl)
(unless site-run-file
(setq site-run-file "site-start")
(let ((verbose (or (getenv "DEBUG") init-file-debug))
(let ((site-run-file "site-start")
(verbose (or (getenv "DEBUG") init-file-debug))
(tail load-path)
(lispdir (expand-file-name "../lisp" data-directory))
dir)
Expand Down Expand Up @@ -141,7 +141,8 @@
" rm -f " (shell-quote-argument script) "\n "
(cond ((eq command :restart) "$@")
((stringp command) command)
((string-join
((listp command)
(string-join
(if (listp (car-safe command))
(cl-loop for line in (doom-enlist command)
collect (mapconcat #'shell-quote-argument (remq nil line) " "))
Expand All @@ -159,9 +160,7 @@
(shell-quote-argument (match-string 2 env)))))
(format "PATH=\"%s%s$PATH\" \\\n" (concat doom-emacs-dir "bin/") path-separator)
"_postscript $@\n"))
(set-file-modes script #o600))))

;; Error code 128 is special: it means run the post-script after this
;; session ends.
128)
))
(set-file-modes script #o600)t
;; Error code 128 is special: it means run the post-script after this
;; session ends.
128))))))

0 comments on commit ef7113d

Please sign in to comment.