Blame SOURCES/0070-shellcheck-Use-command-instead-of-type.patch

a8b6c4
From cbc15ea4a2be99a980a0f762c45b09055ab78527 Mon Sep 17 00:00:00 2001
a8b6c4
From: Martin Kutlak <mkutlak@redhat.com>
a8b6c4
Date: Wed, 12 Dec 2018 16:20:09 +0100
a8b6c4
Subject: [PATCH] shellcheck: Use command instead of type
a8b6c4
a8b6c4
type undefined in POSIX sh.
a8b6c4
Replacing 'command -v' is similar to the builtin 'type' and is defined in POSIX.
a8b6c4
a8b6c4
Fixes ShellCheck warning SC2039.
a8b6c4
a8b6c4
Signed-off-by: Martin Kutlak <mkutlak@redhat.com>
a8b6c4
---
a8b6c4
 src/plugins/abrt-action-analyze-vulnerability.in | 4 ++--
a8b6c4
 1 file changed, 2 insertions(+), 2 deletions(-)
a8b6c4
a8b6c4
diff --git a/src/plugins/abrt-action-analyze-vulnerability.in b/src/plugins/abrt-action-analyze-vulnerability.in
a8b6c4
index 7532b72c..4cae52e6 100755
a8b6c4
--- a/src/plugins/abrt-action-analyze-vulnerability.in
a8b6c4
+++ b/src/plugins/abrt-action-analyze-vulnerability.in
a8b6c4
@@ -2,8 +2,8 @@
a8b6c4
 
a8b6c4
 # Do we have the tools we need?
a8b6c4
 # If no, exit silently.
a8b6c4
-type @GDB@ >/dev/null 2>&1 || exit 0
a8b6c4
-type eu-readelf >/dev/null 2>&1 || exit 0
a8b6c4
+command -v @GDB@ >/dev/null 2>&1 || exit 0
a8b6c4
+command -v eu-readelf >/dev/null 2>&1 || exit 0
a8b6c4
 
a8b6c4
 # Do we have coredump?
a8b6c4
 test -r coredump || {
a8b6c4
-- 
a8b6c4
2.26.2
a8b6c4