summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAriel Barreiro <abarrei@gmail.com>2023-10-01 03:54:06 -0300
committerGitHub <noreply@github.com>2023-10-01 08:54:06 +0200
commit8168c21293de8118af1e95778b1eee8f26cd6d6a (patch)
tree0ddef5b0d1deef65f67b36347b8d9f8bbb26dcb5 /src
parent45e47e5c29480dd88d1daf1b16857e7b9fd1425c (diff)
fix(bash): unbound variable error with STARSHIP_PREEXEC_READY (#5438)
Prevent unbound variable error
Diffstat (limited to 'src')
-rw-r--r--src/init/starship.bash2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/init/starship.bash b/src/init/starship.bash
index 370e0b27b..b7f7cb0e5 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