From f01fc961612950240c8da26733d067ba3dc24949 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 1b0ca0999..54a6dd423 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