From 3ea90518901393df2076a3305ff98adfc132ff8e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 22 Jun 2022 01:23:39 +0200 Subject: [PATCH] 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. --- bin/doom | 2 +- bin/doomscript | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/bin/doom b/bin/doom index bbd7f65a6..6346d3902 100755 --- a/bin/doom +++ b/bin/doom @@ -1,5 +1,5 @@ #!/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 :; emacs="$EMACS -q --no-site-file --no-x-resources --no-splash --batch" :; tmpdir=`$emacs --eval '(princ (temporary-file-directory))' 2>/dev/null` diff --git a/bin/doomscript b/bin/doomscript index fd5be29d3..1a39e707b 100755 --- a/bin/doomscript +++ b/bin/doomscript @@ -16,7 +16,6 @@ # $BASH_SOURCE to locate it would reduce its POSIX compliance). This shouldn't # be an issue for folks writing their own CLIs, however. -set -e case "$EMACS" in *term*) EMACS=emacs ;; *) EMACS="${EMACS:-emacs}" ;;