mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 19:01:49 +00:00
Fix build with multiple GOFLAGS
The tag extraction from GOFLAGS doesn't do anything if -tags is not present in GOFLAGS. Not only does that mean non-sensical tags are passed, but because GOFLAGS is a space-separated variable, the build will fail because the build flags because -tags must be comma-separated. Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
This commit is contained in:
parent
a818ec4346
commit
67e14290aa
@ -807,7 +807,7 @@ kube::golang::build_binaries() {
|
||||
|
||||
# extract tags if any specified in GOFLAGS
|
||||
# shellcheck disable=SC2001
|
||||
gotags="selinux,notest,$(echo "${GOFLAGS:-}" | sed -e 's|.*-tags=\([^-]*\).*|\1|')"
|
||||
gotags="selinux,notest,$(echo "${GOFLAGS:-}" | sed -ne 's|.*-tags=\([^-]*\).*|\1|p')"
|
||||
|
||||
local -a targets=()
|
||||
local arg
|
||||
|
Loading…
Reference in New Issue
Block a user