From 1d95a35cc676d0bebe1c2d9c5bd422f87570f403 Mon Sep 17 00:00:00 2001 From: Vincent Driessen Date: Wed, 18 Jul 2012 09:36:33 +0200 Subject: [PATCH] More portable way of checking whether a command exists. --- run_tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run_tests b/run_tests index 670b438..162c248 100755 --- a/run_tests +++ b/run_tests @@ -4,7 +4,7 @@ check_redis_running() { return $? } -if which -s rg; then +if command -v rg >/dev/null; then safe_rg=rg else # Fall back for systems that don't have rg installed