From de4fefe7ccda8d6ecd13e99aa68c33a95c96fed6 Mon Sep 17 00:00:00 2001 From: "vitess-bot[bot]" <108069721+vitess-bot[bot]@users.noreply.github.com> Date: Fri, 10 May 2024 09:20:45 -0600 Subject: [PATCH] [release-17.0] Update env.sh so that is does not error when running on Mac (#15835) (#15913) Signed-off-by: bddicken Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com> --- examples/common/env.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/common/env.sh b/examples/common/env.sh index abe489e13ed..7bdb1d89284 100644 --- a/examples/common/env.sh +++ b/examples/common/env.sh @@ -90,6 +90,8 @@ alias mysql="command mysql --no-defaults -h 127.0.0.1 -P 15306" alias vtctlclient="command vtctlclient --server localhost:15999 --log_dir ${VTDATAROOT}/tmp --alsologtostderr --config-file-not-found-handling=ignore" alias vtctldclient="command vtctldclient --server localhost:15999" -# Make sure aliases are expanded in non-interactive shell -shopt -s expand_aliases +# If using bash, make sure aliases are expanded in non-interactive shell +if [[ -n ${BASH} ]]; then + shopt -s expand_aliases +fi