From 7e55ee14eb9035ed737eb7ee4ddcb0fdf40feed6 Mon Sep 17 00:00:00 2001 From: Dean Deng Date: Wed, 7 Oct 2020 11:43:31 -0700 Subject: Fix text processing in bazel build command. The extraction of the build target was overfitted before, making build_cmd fail in some environments. PiperOrigin-RevId: 335916651 --- tools/bazel.mk | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/bazel.mk b/tools/bazel.mk index 5e129b2ed..25575c02c 100644 --- a/tools/bazel.mk +++ b/tools/bazel.mk @@ -152,8 +152,9 @@ build_cmd = docker exec $(FULL_DOCKER_EXEC_OPTIONS) $(DOCKER_NAME) sh -o pipefai build_paths = $(build_cmd) 2>&1 \ | tee /proc/self/fd/2 \ - | grep -E "^ bazel-bin/" \ - | tr -d '\r' \ + | grep " bazel-bin/" \ + | sed "s/ /\n/g" \ + | strings -n 10 \ | awk '{$$1=$$1};1' \ | xargs -n 1 -I {} sh -c "$(1)" -- cgit v1.2.3