resource-agents/SOURCES/bz1691456-gcloud-dont-detec...

30 lines
1.2 KiB
Diff

diff -uNr a/bundled/gcp/google-cloud-sdk/bin/gcloud b/bundled/gcp/google-cloud-sdk/bin/gcloud
--- a/bundled/gcp/google-cloud-sdk/bin/gcloud 2019-04-04 12:01:28.838027640 +0200
+++ b/bundled/gcp/google-cloud-sdk/bin/gcloud 2019-04-04 12:03:21.577089065 +0200
@@ -74,24 +74,7 @@
# if CLOUDSDK_PYTHON is empty
if [ -z "$CLOUDSDK_PYTHON" ]; then
- # if python2 exists then plain python may point to a version != 2
- if _cloudsdk_which python2 >/dev/null; then
- CLOUDSDK_PYTHON=python2
- elif _cloudsdk_which python2.7 >/dev/null; then
- # this is what some OS X versions call their built-in Python
- CLOUDSDK_PYTHON=python2.7
- elif _cloudsdk_which python >/dev/null; then
- # Use unversioned python if it exists.
- CLOUDSDK_PYTHON=python
- elif _cloudsdk_which python3 >/dev/null; then
- # We support python3, but only want to default to it if nothing else is
- # found.
- CLOUDSDK_PYTHON=python3
- else
- # This won't work because it wasn't found above, but at this point this
- # is our best guess for the error message.
- CLOUDSDK_PYTHON=python
- fi
+ CLOUDSDK_PYTHON="/usr/libexec/platform-python"
fi
# $PYTHONHOME can interfere with gcloud. Users should use