fix compatible for sh

This commit is contained in:
neil committed 2016-04-16 19:38:11 +08:00
1 parent 6f93064114
commit eac18b1c99
1 file changed
+5 -1
+5 -1
View File
@@ -62,7 +62,11 @@ _exists() {
_err "Usage: _exists cmd"
return 1
fi
command -v $cmd >/dev/null 2>&1
if type command >/dev/null 2>&1 ; then
command -v $cmd >/dev/null 2>&1
else
type $cmd >/dev/null 2>&1
fi
ret="$?"
_debug2 "$cmd exists=$ret"
return $ret
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.