fix _exists for busybox

This commit is contained in:
neil committed 2016-11-17 13:17:29 +08:00
1 parent e0cd2cdb9c
commit 82dc2244c0
1 file changed
+5 -2
+5 -2
View File
@@ -247,9 +247,12 @@ _exists() {
_usage "Usage: _exists cmd"
return 1
fi
if command >/dev/null 2>&1; then
if eval type type >/dev/null 2>&1; then
eval type "$cmd" >/dev/null 2>&1
elif command >/dev/null 2>&1; then
command -v "$cmd" >/dev/null 2>&1
elif which ls >/dev/null 2>&1; then
elif which which >/dev/null 2>&1; then
which "$cmd" >/dev/null 2>&1
fi
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.