From e7dfb8a0d27a0e73c0268d6940b27f48409d3036 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Mon, 10 Sep 2018 10:20:09 -0700 Subject: [PATCH] Detect correct GOOS/ARCH for copying binary with build_consul_local If GOOS/ARCH is set to something custom, we need to unset it before testing the value so we can compare to the _original value_. --- build-support/functions/20-build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-support/functions/20-build.sh b/build-support/functions/20-build.sh index 1b0ca0999c..54a6dd4235 100644 --- a/build-support/functions/20-build.sh +++ b/build-support/functions/20-build.sh @@ -460,7 +460,7 @@ function build_consul_local { mkdir -p "${outdir}" GOBIN_EXTRA="" - if test "${os}" != "$(go env GOOS)" -o "${arch}" != "$(go env GOARCH)" + if test "${os}" != "$(go env GOHOSTOS)" -o "${arch}" != "$(go env GOHOSTARCH)" then GOBIN_EXTRA="${os}_${arch}/" fi