don't search bazel output paths for binaries
This commit is contained in:
@@ -219,16 +219,6 @@ kube::util::find-binary-for-platform() {
|
||||
);
|
||||
fi
|
||||
|
||||
# Also search for binary in bazel build tree if bazel-out/ exists.
|
||||
if [[ -d "${KUBE_ROOT}/bazel-out" ]]; then
|
||||
while IFS=$'\n' read -r bin_build_mode; do
|
||||
if grep -q "${platform}" "${bin_build_mode}"; then
|
||||
# drop the extension to get the real binary path.
|
||||
locations+=("${bin_build_mode%.*}")
|
||||
fi
|
||||
done < <(find "${KUBE_ROOT}/bazel-out/" -name "${lookfor}.go_build_mode")
|
||||
fi
|
||||
|
||||
# List most recently-updated location.
|
||||
local -r bin=$( (ls -t "${locations[@]}" 2>/dev/null || true) | head -1 )
|
||||
|
||||
|
Reference in New Issue
Block a user