diff --git a/examples/common/env.sh b/examples/common/env.sh index 39b29de261d..2416d0aa6c1 100644 --- a/examples/common/env.sh +++ b/examples/common/env.sh @@ -32,8 +32,8 @@ done; # vtctldclient has a separate alias setup below for binary in vttablet vtgate vtctld mysqlctl vtorc vtctl; do - $binary --version | grep -q "19\.[0-9]*\.[0-9]*" - if [[ "$?" -eq "0" ]]; then + BINARY_VERSION=$($binary --version | grep -o "Version: 1[0-9]\.[0-9]*\.[0-9]*" | awk '{print $2}') + if [[ "${BINARY_VERSION}" =~ 19.0.[0-9]* ]]; then alias $binary="$binary --config-file-not-found-handling=ignore" fi done;