]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
tools/setup-virtualenv: verify the `--python` param 42823/head
authorMichael Fritch <mfritch@suse.com>
Tue, 17 Aug 2021 21:37:13 +0000 (15:37 -0600)
committerMichael Fritch <mfritch@suse.com>
Tue, 17 Aug 2021 21:55:04 +0000 (15:55 -0600)
when given an invalid or empty (PYTHON_BINARY)
fixup for 494fea50ced7

Fixes: https://tracker.ceph.com/issues/52304
Signed-off-by: Michael Fritch <mfritch@suse.com>
src/tools/setup-virtualenv.sh

index 0ec89af8e043ab10ca92117f235e49a411209368..152e4859715a9acd91fe075d3d42763cd3578958 100755 (executable)
@@ -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"