misc: Use bash's command instead of which

Bash has a built-in command, `command`, that will search the path and
return the full path to a command if it exists (or an exit code of 1 if
it does not), preventing the requirement of the `which` package.
This commit is contained in:
Joe Julian
2018-01-12 15:57:16 -08:00
committed by James Shubin
parent 077b6e540a
commit bee1aa00f1
3 changed files with 9 additions and 9 deletions

View File

@@ -17,7 +17,7 @@ set -o pipefail
ROOT=$(dirname "${BASH_SOURCE}")/..
RUBY=`which ruby 2>/dev/null`
RUBY=`command -v ruby 2>/dev/null`
if [ -z $RUBY ]; then
fail_test "The 'ruby' utility can't be found."
fi