From 9bb9242dcbbd95b2c4c07f147090c8ef77d527c3 Mon Sep 17 00:00:00 2001 From: bddicken Date: Thu, 2 May 2024 08:25:33 -0700 Subject: [PATCH 1/2] Update env.sh so that is does not error when running on Mac Signed-off-by: bddicken --- examples/common/env.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/common/env.sh b/examples/common/env.sh index 51d0fcb6487..df117439b65 100644 --- a/examples/common/env.sh +++ b/examples/common/env.sh @@ -80,5 +80,7 @@ alias mysql="command mysql --no-defaults -h 127.0.0.1 -P 15306" alias vtctldclient="command vtctldclient --server localhost:15999" # Make sure aliases are expanded in non-interactive shell -shopt -s expand_aliases +if [[ "${SHELL##*/}" == "bash" ]]; then + shopt -s expand_aliases +fi From 2c6ae2668eb1a8c3439d86f4b29f8b53230b1c6e Mon Sep 17 00:00:00 2001 From: bddicken Date: Thu, 9 May 2024 16:43:57 -0700 Subject: [PATCH 2/2] Change if statement, update comment Signed-off-by: bddicken --- examples/common/env.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/common/env.sh b/examples/common/env.sh index df117439b65..50df4a65296 100644 --- a/examples/common/env.sh +++ b/examples/common/env.sh @@ -79,8 +79,8 @@ mkdir -p "${VTDATAROOT}/tmp" alias mysql="command mysql --no-defaults -h 127.0.0.1 -P 15306" alias vtctldclient="command vtctldclient --server localhost:15999" -# Make sure aliases are expanded in non-interactive shell -if [[ "${SHELL##*/}" == "bash" ]]; then +# If using bash, make sure aliases are expanded in non-interactive shell +if [[ -n ${BASH} ]]; then shopt -s expand_aliases fi