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.
pull/1311/head
Kyle Welsby 2019-01-16 17:35:44 +00:00
parent 792593c995
commit fedb72b34f
No known key found for this signature in database
GPG Key ID: BC51CCFC7174F463
1 changed files with 3 additions and 1 deletions

View File

@ -44,7 +44,9 @@ _bash-it-clean-component-cache() {
done done
else else
cache="$(_bash-it-component-cache-file ${component})" cache="$(_bash-it-component-cache-file ${component})"
[[ -f "${cache}" ]] && rm -f "${cache}" if [[ -f "${cache}" ]] ; then
rm -f "${cache}"
fi
fi fi
} }