Skip to content

Commit 8168c21

Browse files
authored
fix(bash): unbound variable error with STARSHIP_PREEXEC_READY (starship#5438)
Prevent unbound variable error
1 parent 45e47e5 commit 8168c21

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/init/starship.bash

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ starship_preexec() {
2121
local PREV_LAST_ARG=$1
2222

2323
# Avoid restarting the timer for commands in the same pipeline
24-
if [ "$STARSHIP_PREEXEC_READY" = "true" ]; then
24+
if [ "${STARSHIP_PREEXEC_READY:-}" = "true" ]; then
2525
STARSHIP_PREEXEC_READY=false
2626
STARSHIP_START_TIME=$(::STARSHIP:: time)
2727
fi

0 commit comments

Comments
 (0)