mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
fix(cli): #6772 - trivial doomscripts fail
When trying to establish the value of EMACSDIR, the proper fallback when BASH_SOURCE is undefined is $0 rather than 0, in correct shell- scripting parlance.
This commit is contained in:
committed by
Henrik Lissner
parent
2548632600
commit
571ab7425a
@ -44,7 +44,7 @@ fi
|
|||||||
# Doom respects $EMACSDIR to tell it where Doom lives. If it fails, then this is
|
# Doom respects $EMACSDIR to tell it where Doom lives. If it fails, then this is
|
||||||
# either isn't bash, or it's a posix shell being directly sourced with sh, which
|
# either isn't bash, or it's a posix shell being directly sourced with sh, which
|
||||||
# is unsupported.
|
# is unsupported.
|
||||||
export EMACSDIR="${EMACSDIR:-$(CDPATH= cd -- $(dirname -- "${BASH_SOURCE:-0}")/.. && pwd)}"
|
export EMACSDIR="${EMACSDIR:-$(CDPATH= cd -- $(dirname -- "${BASH_SOURCE:-$0}")/.. && pwd)}"
|
||||||
if [ ! -f "$EMACSDIR/early-init.el" ]; then
|
if [ ! -f "$EMACSDIR/early-init.el" ]; then
|
||||||
>&2 echo "Error: cannot load $EMACSDIR/early-init.el."
|
>&2 echo "Error: cannot load $EMACSDIR/early-init.el."
|
||||||
>&2 echo
|
>&2 echo
|
||||||
|
Reference in New Issue
Block a user