From e03824bf5ee2d9bdd5e49c7f488b012310804008 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 27 Aug 2020 14:34:32 -0400 Subject: [PATCH] bin/doom: improve POSIX compliance + The bourne shell does not guarantee it'll understand the new $() subshell syntax. + Can't rely on set -e to short circuit the script. No avoiding the roundabout suppression of the postscript error with '&& true'. Might fix #3844, but doubt it. --- bin/doom | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/doom b/bin/doom index 084e837dd..440872814 100755 --- a/bin/doom +++ b/bin/doom @@ -3,7 +3,7 @@ :; case "$EMACS" in *term*) EMACS=emacs ;; *) EMACS="${EMACS:-emacs}" ;; esac :; $EMACS --version >/dev/null 2>&1 || { >&2 echo "Can't find emacs in your PATH"; exit 1; } :; $EMACS --no-site-file --script "$0" -- "$@" || __DOOMCODE=$? -:; [ "${__DOOMCODE:-0}" -eq 128 ] && "$(emacs -Q --batch --eval '(princ temporary-file-directory)')/doom.sh" "$0" "$@" +:; [ "${__DOOMCODE:-0}" -eq 128 ] && { "`$EMACS -Q --batch --eval '(princ temporary-file-directory)'`/doom.sh" "$0" "$@" && true; __DOOMCODE=$?; } :; exit $__DOOMCODE ;; The garbage collector isn't important during CLI ops. A higher threshold