]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb-tests: Redirect stderr too when checking for shellcheck
authorMartin Schwenke <martin@meltin.net>
Wed, 11 Mar 2020 05:33:27 +0000 (16:33 +1100)
committerAmitay Isaacs <amitay@samba.org>
Wed, 22 Jul 2020 02:42:37 +0000 (02:42 +0000)
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 <martin@meltin.net>
ctdb/tests/UNIT/shellcheck/scripts/local.sh

index 6bc93fd9146f16709863f716af990f17d13c997f..c069314b0aa527d5106db3727e8f506528680efe 100644 (file)
@@ -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