fix(bash): unbound variable error with STARSHIP_PREEXEC_READY (#5438)

Prevent unbound variable error
This commit is contained in:
Ariel Barreiro 2023-10-01 03:54:06 -03:00 committed by GitHub
parent 45e47e5c29
commit 8168c21293
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -21,7 +21,7 @@ starship_preexec() {
local PREV_LAST_ARG=$1 local PREV_LAST_ARG=$1
# Avoid restarting the timer for commands in the same pipeline # 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_PREEXEC_READY=false
STARSHIP_START_TIME=$(::STARSHIP:: time) STARSHIP_START_TIME=$(::STARSHIP:: time)
fi fi