diff --git a/hack/lib/golang.sh b/hack/lib/golang.sh index 4ad3bf45108..22a3bc2be5f 100755 --- a/hack/lib/golang.sh +++ b/hack/lib/golang.sh @@ -496,7 +496,8 @@ kube::golang::outfile_for_binary() { # Returns 0 if the binary can be built with coverage, 1 otherwise. # NB: this ignores whether coverage is globally enabled or not. kube::golang::is_instrumented_package() { - return "$(kube::util::array_contains "$1" "${KUBE_COVERAGE_INSTRUMENTED_PACKAGES[@]}")" + kube::util::array_contains "$1" "${KUBE_COVERAGE_INSTRUMENTED_PACKAGES[@]}" + return $? } # Argument: the name of a Kubernetes package (e.g. k8s.io/kubernetes/cmd/kube-scheduler)