setup.sh: replace type -p with test -e

type -p will exit 1 on failure.
Test makes the intent clearer here.
This commit is contained in:
happysalada
2021-07-06 09:27:18 +09:00
committed by Raphael Megzari
parent ac27528177
commit b49f22fd3e
+1 -1
View File
@@ -68,7 +68,7 @@ _callImplicitHook() {
local hookName="$2"
if declare -F "$hookName" > /dev/null; then
"$hookName"
elif type -p "$hookName" > /dev/null; then
elif test -e "$hookName" ; then
source "$hookName"
elif [ -n "${!hookName:-}" ]; then
eval "${!hookName}"