From 8168c21293de8118af1e95778b1eee8f26cd6d6a Mon Sep 17 00:00:00 2001 From: Ariel Barreiro Date: Sun, 1 Oct 2023 03:54:06 -0300 Subject: [PATCH] fix(bash): unbound variable error with STARSHIP_PREEXEC_READY (#5438) Prevent unbound variable error --- src/init/starship.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/init/starship.bash b/src/init/starship.bash index 370e0b27..b7f7cb0e 100644 --- a/src/init/starship.bash +++ b/src/init/starship.bash @@ -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