diff --git a/lib/utils.sh b/lib/utils.sh index 0c0c4cf..95dbfa2 100644 --- a/lib/utils.sh +++ b/lib/utils.sh @@ -26,8 +26,11 @@ function_exists() { die 11 --force fi - LC_ALL=C type -t $1 | grep function - return $? + if [[ $(LC_ALL=C type -t $1 | grep function) ]]; then + return 0 + else + return 1 + fi } export -f function_exists