From: Martin Schwenke Date: Wed, 11 Mar 2020 05:33:27 +0000 (+1100) Subject: ctdb-tests: Redirect stderr too when checking for shellcheck X-Git-Tag: talloc-2.3.2~1057 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=847aa0e367c721944650aa34d67f8073461ae272;p=thirdparty%2Fsamba.git ctdb-tests: Redirect stderr too when checking for shellcheck Avoid: .../UNIT/shellcheck/scripts/local.sh: line 14: type: shellcheck: not found The "type" command in dash prints the "not found" message to stdout but the bash version prints to stderr, so redirect stderr too. Signed-off-by: Martin Schwenke --- diff --git a/ctdb/tests/UNIT/shellcheck/scripts/local.sh b/ctdb/tests/UNIT/shellcheck/scripts/local.sh index 6bc93fd9146..c069314b0aa 100644 --- a/ctdb/tests/UNIT/shellcheck/scripts/local.sh +++ b/ctdb/tests/UNIT/shellcheck/scripts/local.sh @@ -11,7 +11,7 @@ define_test () shellcheck_test () { ok_null - if type shellcheck >/dev/null ; then + if type shellcheck >/dev/null 2>&1 ; then # Skip some recent checks: # # SC1090: Can't follow non-constant source. Use a