From c8d4c131adfe41739fd557091dc2931c1b7f15c5 Mon Sep 17 00:00:00 2001 From: Michael Fritch Date: Tue, 17 Aug 2021 15:37:13 -0600 Subject: [PATCH] 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 --- src/tools/setup-virtualenv.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/tools/setup-virtualenv.sh b/src/tools/setup-virtualenv.sh index 0ec89af8e043a..152e4859715a9 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" -- 2.39.5