From 8bc4e2d45e4ceac360f73f5cfb09fa68d9ff2195 Mon Sep 17 00:00:00 2001 From: Ray-Eldath Date: Thu, 11 Jan 2024 17:34:20 +0800 Subject: [PATCH] Fix greenplum_path.sh change PATH Now only override PATH when Python used during ./configure isn't included in. --- gpMgmt/bin/generate-greenplum-path.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gpMgmt/bin/generate-greenplum-path.sh b/gpMgmt/bin/generate-greenplum-path.sh index 70eeb48f5cf..93aa6545b3c 100755 --- a/gpMgmt/bin/generate-greenplum-path.sh +++ b/gpMgmt/bin/generate-greenplum-path.sh @@ -27,13 +27,20 @@ else fi EOF +# only override PATH when Python used during ./configure isn't included in. +if [[ $(python3 -c "import sys; print(sys.executable)") == "${WHICHPYTHON}" ]]; then + PATHSTR='${GPHOME}/bin:${PATH}' +else + PATHSTR='${GPHOME}/bin:${PYTHONBINDIR}:${PATH}' +fi + cat <