From: Philippe Proulx Date: Thu, 26 Oct 2023 13:13:44 +0000 (-0400) Subject: tools/format-cpp: use a group of `echo` lines with a single `>& 2` X-Git-Url: http://git.efficios.com/?a=commitdiff_plain;ds=sidebyside;h=ed6ecdedb8fc3d055ef2a6858a8370982cb3712d;p=babeltrace.git tools/format-cpp: use a group of `echo` lines with a single `>& 2` Signed-off-by: Philippe Proulx Change-Id: I4202fa48c0fe6909aeb3b1ea34870e920908917f Reviewed-on: https://review.lttng.org/c/babeltrace/+/11144 Reviewed-by: Simon Marchi --- diff --git a/tools/format-cpp b/tools/format-cpp index 29a0bf7e..dfc4bbd5 100755 --- a/tools/format-cpp +++ b/tools/format-cpp @@ -17,11 +17,14 @@ format_cpp() { fi if [[ "$version" != *"clang-format version $expected_formatter_major_version"* ]]; then - echo "Expecting clang-format $expected_formatter_major_version." >&2 - echo >&2 - echo Got: >&2 - echo >&2 - echo "$version" >&2 + { + echo "Expecting clang-format $expected_formatter_major_version." + echo + echo Got: + echo + echo "$version" + } >& 2 + return 1 fi