From 275212bbc964c453fbde596812eea1f992468ee2 Mon Sep 17 00:00:00 2001 From: Tim Allclair Date: Mon, 8 Oct 2018 17:20:02 -0700 Subject: [PATCH] Fix find-binary to locate bazel e2e tests --- hack/lib/util.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hack/lib/util.sh b/hack/lib/util.sh index 19220c93c3b..099abc55028 100755 --- a/hack/lib/util.sh +++ b/hack/lib/util.sh @@ -163,11 +163,11 @@ kube::util::find-binary-for-platform() { "${KUBE_ROOT}/platforms/${platform}/${lookfor}" ) # Also search for binary in bazel build tree. - # The bazel go rules place binaries in subtrees like + # The bazel go rules place some binaries in subtrees like # "bazel-bin/source/path/linux_amd64_pure_stripped/binaryname", so make sure # the platform name is matched in the path. locations+=($(find "${KUBE_ROOT}/bazel-bin/" -type f -executable \ - -path "*/${platform/\//_}*/${lookfor}" 2>/dev/null || true) ) + \( -path "*/${platform/\//_}*/${lookfor}" -o -path "*/${lookfor}" \) 2>/dev/null || true) ) # List most recently-updated location. local -r bin=$( (ls -t "${locations[@]}" 2>/dev/null || true) | head -1 )