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:
parent
2548632600
commit
571ab7425a
1 changed files with 1 additions and 1 deletions
|
@ -44,7 +44,7 @@ fi
|
|||
# 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
|
||||
# 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
|
||||
>&2 echo "Error: cannot load $EMACSDIR/early-init.el."
|
||||
>&2 echo
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue