fix verion comparison in check_install_golang script

pull/20269/head v1.35.0
Predrag Rogic 2025-01-16 00:36:52 +00:00 committed by Medya Ghazizadeh
parent 49981a7920
commit dd5d320e41
1 changed files with 1 additions and 1 deletions

View File

@ -55,7 +55,7 @@ function check_and_install_golang() {
# golang has been installed and check its version
if [[ $(go version | cut -d' ' -f 3) =~ go(([0-9]+)\.([0-9]+).([0-9]+)*) ]]; then
HOST_VERSION=${BASH_REMATCH[1]}
if [ $HOST_VERSION = $VERSION_TO_INSTALL ]; then
if [ $HOST_VERSION == $VERSION_TO_INSTALL ]; then
echo "go version on the host looks good : $HOST_VERSION"
else
echo "WARNING: expected go version to be $VERSION_TO_INSTALL but got $HOST_VERSION"