check_install_golang.sh: fix "HOST_VERSION: command not found" issue

HOST_VERSION is defined in if, we can't use it in else

Signed-off-by: Ma Xinjian <maxj.fnst@cn.fujitsu.com>
pull/8879/head
Ma Xinjian 2020-07-23 15:29:15 +08:00
parent 47435d94a7
commit db830c355c
1 changed files with 1 additions and 1 deletions

View File

@ -43,7 +43,7 @@ function check_and_install_golang() {
install_golang "$VERSION_TO_INSTALL" "$INSTALL_PATH"
fi
else
echo "ERROR: Failed to parse golang version: $HOST_VERSION"
echo "ERROR: Failed to parse golang version: $(go version)"
return
fi
}