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
This commit is contained in:
Dean Deng
2020-10-07 11:45:26 -07:00
committed by gVisor bot
parent 95cac27d0d
commit 7e55ee14eb
+3 -2
View File
@@ -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)"