From 5957d189ea9e7b6f41662dc271d69f7f9f4d3072 Mon Sep 17 00:00:00 2001 From: John D Pell Date: Fri, 18 Feb 2022 02:40:05 -0800 Subject: [PATCH] lib/utilities: `_bash-it-component-item-is-enabled()` - Use normal `if`/`then` --- lib/utilities.bash | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/utilities.bash b/lib/utilities.bash index d576c8e4..8ea6b98c 100644 --- a/lib/utilities.bash +++ b/lib/utilities.bash @@ -178,8 +178,12 @@ function _bash-it-component-item-is-enabled() { for each_file in "${BASH_IT}/enabled"/*"${BASH_IT_LOAD_PRIORITY_SEPARATOR?}${item_name}.${component_type}"*."bash" \ "${BASH_IT}/${component_type}"*/"enabled/${item_name}.${component_type}"*."bash" \ "${BASH_IT}/${component_type}"*/"enabled"/*"${BASH_IT_LOAD_PRIORITY_SEPARATOR?}${item_name}.${component_type}"*."bash"; do - [[ -f "${each_file}" ]] && return + if [[ -f "${each_file}" ]]; then + return 0 + fi done + + return 1 } # Checks if a given item is disabled for a particular component/file-type.