mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 10:51:29 +00:00
Fix building with GOFLAGS=-v
With go1.15 running go version with "-v" fails, and we should support it.
This commit is contained in:
parent
529c13471b
commit
1524794231
@ -465,7 +465,7 @@ EOF
|
||||
fi
|
||||
|
||||
local go_version
|
||||
IFS=" " read -ra go_version <<< "$(go version)"
|
||||
IFS=" " read -ra go_version <<< "$(GOFLAGS='' go version)"
|
||||
local minimum_go_version
|
||||
minimum_go_version=go1.15.0
|
||||
if [[ "${minimum_go_version}" != $(echo -e "${minimum_go_version}\n${go_version[2]}" | sort -s -t. -k 1,1 -k 2,2n -k 3,3n | head -n1) && "${go_version[2]}" != "devel" ]]; then
|
||||
@ -777,7 +777,7 @@ kube::golang::build_binaries() {
|
||||
(
|
||||
# Check for `go` binary and set ${GOPATH}.
|
||||
kube::golang::setup_env
|
||||
V=2 kube::log::info "Go version: $(go version)"
|
||||
V=2 kube::log::info "Go version: $(GOFLAGS='' go version)"
|
||||
|
||||
local host_platform
|
||||
host_platform=$(kube::golang::host_platform)
|
||||
|
Loading…
Reference in New Issue
Block a user