From: Michael Fritch Date: Tue, 17 Aug 2021 21:37:13 +0000 (-0600) Subject: tools/setup-virtualenv: verify the `--python` param X-Git-Tag: v17.1.0~1076^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F42823%2Fhead;p=ceph.git tools/setup-virtualenv: verify the `--python` param when given an invalid or empty (PYTHON_BINARY) fixup for 494fea50ced7 Fixes: https://tracker.ceph.com/issues/52304 Signed-off-by: Michael Fritch --- diff --git a/src/tools/setup-virtualenv.sh b/src/tools/setup-virtualenv.sh index 0ec89af8e043..152e4859715a 100755 --- a/src/tools/setup-virtualenv.sh +++ b/src/tools/setup-virtualenv.sh @@ -50,6 +50,11 @@ while true ; do esac done +if ! $PYTHON -VV; then + echo "$SCRIPTNAME: unable to locate a valid PYTHON_BINARY" + usage +fi + DIR=$1 if [ -z "$DIR" ] ; then echo "$SCRIPTNAME: need a directory path, but none was provided"