Skip to content

Commit

Permalink
Merge pull request #18807 from soltysh/fix_golang_check
Browse files Browse the repository at this point in the history
Automatic merge from submit-queue.

Fix golang check so that it performs arithemtic comparison

/assign @stevekuznetsov
  • Loading branch information
openshift-merge-robot authored Mar 7, 2018
2 parents c1befdd + 117392b commit 49a1733
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hack/lib/util/golang.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function os::golang::verify_go_version() {

local go_version
go_version=($(go version))
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
os::log::info "Detected go version: ${go_version[*]}."
if [[ -z "${PERMISSIVE_GO:-}" ]]; then
os::log::fatal "Please install Go version ${OS_REQUIRED_GO_VERSION} or use PERMISSIVE_GO=y to bypass this check."
Expand Down

0 comments on commit 49a1733

Please sign in to comment.