From 29a3fce28f380e3b5c2e44a697fbf35be2a139da Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Wed, 11 Mar 2020 16:33:27 +1100 Subject: 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 Reviewed-by: Amitay Isaacs --- ctdb/tests/UNIT/shellcheck/scripts/local.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.1