utils.sh: fixed function_exists not to display grep result

This commit is contained in:
levasseur
2021-12-17 16:43:55 +01:00
parent 768fd0ffde
commit ed0563b770

View File

@@ -26,8 +26,11 @@ function_exists() {
die 11 --force die 11 --force
fi fi
LC_ALL=C type -t $1 | grep function if [[ $(LC_ALL=C type -t $1 | grep function) ]]; then
return $? return 0
else
return 1
fi
} }
export -f function_exists export -f function_exists