fix(cli): remove set -e from bin/doom{,script}
This killed the script prematurely (without displaying the error) if Emacs failed to execute. In versions prior to bash 4, set -e would not terminate the script if a non-zero exit code occurred within a subshell, but it will in bash 4+. In any case, we don't need this fallback to begin with. The script handles its errors sufficiently otherwise.
This commit is contained in:
parent
f0e8728bbc
commit
3ea9051890
2 changed files with 1 additions and 2 deletions
2
bin/doom
2
bin/doom
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
:; set -e # -*- mode: emacs-lisp; lexical-binding: t -*-
|
:; # -*- mode: emacs-lisp; lexical-binding: t -*-
|
||||||
:; case "$EMACS" in *term*) EMACS=emacs ;; *) EMACS="${EMACS:-emacs}" ;; esac
|
:; case "$EMACS" in *term*) EMACS=emacs ;; *) EMACS="${EMACS:-emacs}" ;; esac
|
||||||
:; emacs="$EMACS -q --no-site-file --no-x-resources --no-splash --batch"
|
:; emacs="$EMACS -q --no-site-file --no-x-resources --no-splash --batch"
|
||||||
:; tmpdir=`$emacs --eval '(princ (temporary-file-directory))' 2>/dev/null`
|
:; tmpdir=`$emacs --eval '(princ (temporary-file-directory))' 2>/dev/null`
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
# $BASH_SOURCE to locate it would reduce its POSIX compliance). This shouldn't
|
# $BASH_SOURCE to locate it would reduce its POSIX compliance). This shouldn't
|
||||||
# be an issue for folks writing their own CLIs, however.
|
# be an issue for folks writing their own CLIs, however.
|
||||||
|
|
||||||
set -e
|
|
||||||
case "$EMACS" in
|
case "$EMACS" in
|
||||||
*term*) EMACS=emacs ;;
|
*term*) EMACS=emacs ;;
|
||||||
*) EMACS="${EMACS:-emacs}" ;;
|
*) EMACS="${EMACS:-emacs}" ;;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue