Skip to content

Commit 83b9ed0

Browse files
committed
Swallow all type output
1 parent 5e2ff56 commit 83b9ed0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

bin/ruby-build

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@ make_package() {
9090
}
9191

9292
fetch_url() {
93-
if type curl 2>/dev/null; then
93+
if type curl &>/dev/null; then
9494
curl "$@"
95-
elif type wget 2>/dev/null; then
95+
elif type wget &>/dev/null; then
9696
wget -O- "$@"
9797
else
9898
echo "error: please install \`curl\` or \`wget\` and try again" >&2
@@ -117,7 +117,7 @@ fetch_git() {
117117

118118
echo "Cloning ${git_url}..." >&2
119119

120-
if type git 2>/dev/null; then
120+
if type git &>/dev/null; then
121121
git clone --depth 1 --branch "$git_ref" "$git_url" "${package_name}" >&4 2>&1
122122
else
123123
echo "error: please install \`git\` and try again" >&2

0 commit comments

Comments
 (0)