From f276d47327328e9eeb6c83e7d2e3e29c37c17c00 Mon Sep 17 00:00:00 2001 From: Kyr Shatskyy Date: Fri, 6 Aug 2021 16:07:48 +0200 Subject: [PATCH] bootstrap: do not use 'which' Since 'which' command can be absent on some systems by default, it is easier to test a tool bresence just trying to print its version only. Signed-off-by: Kyr Shatskyy --- bootstrap | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bootstrap b/bootstrap index 274bea928..c4eb91afd 100755 --- a/bootstrap +++ b/bootstrap @@ -124,7 +124,7 @@ Linux) esac ;; Darwin) - if ! which brew > /dev/null; then + if ! brew --version &>/dev/null; then echo "You need Homebrew: http://brew.sh/" exit 1 fi @@ -149,7 +149,7 @@ if [ -e ./$VENV ] && [ ! -e ./$VENV/lib/python*/no-global-site-packages.txt ]; fi if [ -z "$NO_CLOBBER" ] || [ ! -e ./$VENV ]; then - if ! which virtualenv > /dev/null; then + if ! virtualenv --version &>/dev/null; then pip install virtualenv fi virtualenv --python=$PYTHON $VENV -- 2.47.3