From a2a5038b970df20ec512447b7bbbe96fa2446851 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 27 Aug 2020 00:58:03 -0400 Subject: [PATCH] Fix #3844: bin/doom emits wrong-type-arg error on windows For some reason __DOOMPOST isn't being exported into emacs' environment on Windows (powershell and git bash). --- bin/doom | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bin/doom b/bin/doom index d056f6949..084e837dd 100755 --- a/bin/doom +++ b/bin/doom @@ -1,10 +1,9 @@ #!/usr/bin/env sh :; set -e # -*- mode: emacs-lisp; lexical-binding: t -*- :; case "$EMACS" in *term*) EMACS=emacs ;; *) EMACS="${EMACS:-emacs}" ;; esac -:; export __DOOMPOST="${TMPDIR:-/tmp}/doom.sh" :; $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 ] && { "$__DOOMPOST" "$0" "$@" && true; __DOOMCODE=$?; } +:; [ "${__DOOMCODE:-0}" -eq 128 ] && "$(emacs -Q --batch --eval '(princ temporary-file-directory)')/doom.sh" "$0" "$@" :; exit $__DOOMCODE ;; The garbage collector isn't important during CLI ops. A higher threshold @@ -94,7 +93,7 @@ (pred stringp) (pred keywordp)) command) - (let ((script (getenv "__DOOMPOST")) + (let ((script (expand-file-name "doom.sh" temporary-file-directory)) (coding-system-for-write 'utf-8-unix) (coding-system-for-read 'utf-8-unix)) (with-temp-file script