Blame SOURCES/0069-shellcheck-Check-exit-code-directly-with-if-mycmd.patch

a8b6c4
From 58d1e4fa0a0f6fc2fc3ee773665de70a073ae759 Mon Sep 17 00:00:00 2001
a8b6c4
From: Martin Kutlak <mkutlak@redhat.com>
a8b6c4
Date: Wed, 12 Dec 2018 16:16:55 +0100
a8b6c4
Subject: [PATCH] shellcheck: Check exit code directly with if mycmd
a8b6c4
a8b6c4
Running a command and then checking its exit status $? against 0 is redundant.
a8b6c4
a8b6c4
Fixes ShellCheck warning SC2181.
a8b6c4
a8b6c4
Signed-off-by: Martin Kutlak <mkutlak@redhat.com>
a8b6c4
---
a8b6c4
 src/plugins/abrt-action-analyze-ccpp-local.in | 8 +++-----
a8b6c4
 1 file changed, 3 insertions(+), 5 deletions(-)
a8b6c4
a8b6c4
diff --git a/src/plugins/abrt-action-analyze-ccpp-local.in b/src/plugins/abrt-action-analyze-ccpp-local.in
a8b6c4
index 9144c0e6..d2453c19 100644
a8b6c4
--- a/src/plugins/abrt-action-analyze-ccpp-local.in
a8b6c4
+++ b/src/plugins/abrt-action-analyze-ccpp-local.in
a8b6c4
@@ -36,9 +36,7 @@ if $INSTALL_DI; then
a8b6c4
         fi
a8b6c4
     done
a8b6c4
 
a8b6c4
-    ${EXECUTABLE} ${EXTRA_ARGS} --size_mb=4096
a8b6c4
-fi
a8b6c4
-
a8b6c4
-if [ $? = 0 ]; then
a8b6c4
-    abrt-action-generate-backtrace && abrt-action-analyze-backtrace
a8b6c4
+   if ${EXECUTABLE} "${EXTRA_ARGS}" --size_mb=4096; then
a8b6c4
+       abrt-action-generate-backtrace && abrt-action-analyze-backtrace
a8b6c4
+   fi
a8b6c4
 fi
a8b6c4
-- 
a8b6c4
2.26.2
a8b6c4