]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
tools/setup-virtualenv: verify the `--python` param 43264/head
authorMichael Fritch <mfritch@suse.com>
Tue, 17 Aug 2021 21:37:13 +0000 (15:37 -0600)
committerCory Snyder <csnyder@iland.com>
Wed, 22 Sep 2021 18:14:14 +0000 (14:14 -0400)
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>
(cherry picked from commit c8d4c131adfe41739fd557091dc2931c1b7f15c5)

src/tools/setup-virtualenv.sh

index e9a1c6ddfbe4db774e95f8832b70f20b718937b1..34aee158a2302d3f595d749200a0d5126a008cc0 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"