From fedb72b34f148e9b3dd2c3aa3164c4d58feed2ef Mon Sep 17 00:00:00 2001 From: Kyle Welsby Date: Wed, 16 Jan 2019 17:35:44 +0000 Subject: [PATCH] Fixes exit 1 issue when tmp cache doesn't exist Found if this `${cache}` file doesn't exist, the single line conditional command would return false causing a `exit 1`. This little change makes the conditional verbose and not cause a false return failing the function. --- lib/utilities.bash | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/utilities.bash b/lib/utilities.bash index 93e96606..d7cf6f3f 100644 --- a/lib/utilities.bash +++ b/lib/utilities.bash @@ -44,7 +44,9 @@ _bash-it-clean-component-cache() { done else cache="$(_bash-it-component-cache-file ${component})" - [[ -f "${cache}" ]] && rm -f "${cache}" + if [[ -f "${cache}" ]] ; then + rm -f "${cache}" + fi fi }