From 8a0e3e51e0eb9d65a60a6fa1d5de806297639231 Mon Sep 17 00:00:00 2001 From: Eric Paris Date: Tue, 4 Nov 2014 13:58:06 -0500 Subject: [PATCH] fix unbounded host_platform when building with --use_go_build It's actually used unset a couple of lines after this patch, but this just resolves it in one place instead of calling $(kube::golang::host_platform) twice. --- hack/lib/golang.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hack/lib/golang.sh b/hack/lib/golang.sh index 5ebedbf5bf3..a4140c50701 100644 --- a/hack/lib/golang.sh +++ b/hack/lib/golang.sh @@ -233,6 +233,9 @@ kube::golang::build_binaries() { local version_ldflags version_ldflags=$(kube::version::ldflags) + local host_platform + host_platform=$(kube::golang::host_platform) + # Use eval to preserve embedded quoted strings. local goflags eval "goflags=(${KUBE_GOFLAGS:-})" @@ -257,7 +260,7 @@ kube::golang::build_binaries() { local -a platforms=("${KUBE_BUILD_PLATFORMS[@]:+${KUBE_BUILD_PLATFORMS[@]}}") if [[ ${#platforms[@]} -eq 0 ]]; then - platforms=("$(kube::golang::host_platform)") + platforms=("${host_platform}") fi local binaries