We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c1befdd + 117392b commit 49a1733Copy full SHA for 49a1733
hack/lib/util/golang.sh
@@ -8,7 +8,7 @@ function os::golang::verify_go_version() {
8
9
local go_version
10
go_version=($(go version))
11
- if [[ "${go_version[2]}" < "${OS_REQUIRED_GO_VERSION}" ]]; then
+ if ! echo "${go_version[2]#go}" | awk -F. -v min=${OS_REQUIRED_GO_VERSION#go} '{ exit $2 < min }'; then
12
os::log::info "Detected go version: ${go_version[*]}."
13
if [[ -z "${PERMISSIVE_GO:-}" ]]; then
14
os::log::fatal "Please install Go version ${OS_REQUIRED_GO_VERSION} or use PERMISSIVE_GO=y to bypass this check."
0 commit comments