Skip to content

Commit

Permalink
fix(bash): unbound variable error with STARSHIP_PREEXEC_READY (#5438)
Browse files Browse the repository at this point in the history
Prevent unbound variable error
  • Loading branch information
hanoii committed Oct 1, 2023
1 parent 45e47e5 commit 8168c21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/init/starship.bash
Expand Up @@ -21,7 +21,7 @@ starship_preexec() {
local PREV_LAST_ARG=$1

# Avoid restarting the timer for commands in the same pipeline
if [ "$STARSHIP_PREEXEC_READY" = "true" ]; then
if [ "${STARSHIP_PREEXEC_READY:-}" = "true" ]; then
STARSHIP_PREEXEC_READY=false
STARSHIP_START_TIME=$(::STARSHIP:: time)
fi
Expand Down

0 comments on commit 8168c21

Please sign in to comment.