From 20eeda825af95238b9538e04cd750804c96c2acb Mon Sep 17 00:00:00 2001 From: Zoey Greer Date: Fri, 20 Sep 2024 08:57:53 -0700 Subject: [PATCH] Fix bash ternary in `//benchmarks:size_data` (#18234) Replaces pseudocode bash ternary with working bash ternary. Closes #18234 COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/18234 from tempoz:tempoz-fix-bash-ternary b43be78388b4dcc449d8fbc535b9e1ab08988166 PiperOrigin-RevId: 676861548 --- benchmarks/BUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmarks/BUILD b/benchmarks/BUILD index 010cedc305..c92d844f73 100644 --- a/benchmarks/BUILD +++ b/benchmarks/BUILD @@ -235,7 +235,7 @@ genrule( ), outs = ["size_data.txt"], # We want --format=GNU which counts rodata with data, not text. - cmd = "size $$($$OSTYPE == 'linux-gnu' ? '--format=GNU -d' : '') $(SRCS) > $@", + cmd = "size $$([ $$OSTYPE == 'linux-gnu' ] && echo '--format=GNU -d' || echo '') $(SRCS) > $@", # "size" sometimes isn't available remotely. local = 1, tags = ["no-remote-exec"],