From 6208515a86780a6d6b658dcc149bc9e12c5be480 Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Fri, 8 Jan 2021 12:08:33 +0100 Subject: [PATCH] dist/whitespacecheck: use result of piped command for return value --- dist/tools/whitespacecheck/check.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/tools/whitespacecheck/check.sh b/dist/tools/whitespacecheck/check.sh index 37f9938518..6d8e9a6425 100755 --- a/dist/tools/whitespacecheck/check.sh +++ b/dist/tools/whitespacecheck/check.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Copyright 2015 Oliver Hahm # @@ -38,7 +38,7 @@ fi git -c core.whitespace="tab-in-indent,tabwidth=4" \ diff --check "$(git merge-base "${BRANCH}" HEAD)" -- *.[ch] ${IGNORE} \ | ${LOG} -RESULT=$? +RESULT=${PIPESTATUS[0]} # Git regards any trailing white space except `\n` as an error so `\r` is # checked here, too @@ -46,7 +46,7 @@ git -c core.whitespace="trailing-space" \ diff --check "$(git merge-base "${BRANCH}" HEAD)" -- . ${IGNORE} \ | ${LOG} -TRAILING_RESULT=$? +TRAILING_RESULT=${PIPESTATUS[0]} github_annotate_parse_log_default