Blame SOURCES/scap-security-guide-0.1.53-fix_platform_bash_shellcheck_warning-PR_6184.patch

fe0dde
From 4e05806826cc0a5797e6ff50e6a953ae15607c03 Mon Sep 17 00:00:00 2001
fe0dde
From: Watson Sato <wsato@redhat.com>
fe0dde
Date: Mon, 12 Oct 2020 14:22:02 +0200
fe0dde
Subject: [PATCH] Improve Bash machine platform check
fe0dde
fe0dde
Fix ShellCheck warning SC2166, "-a" syntax is error prone.
fe0dde
---
fe0dde
 ssg/build_remediations.py | 2 +-
fe0dde
 1 file changed, 1 insertion(+), 1 deletion(-)
fe0dde
fe0dde
diff --git a/ssg/build_remediations.py b/ssg/build_remediations.py
fe0dde
index 572db61701..6759b6c963 100644
fe0dde
--- a/ssg/build_remediations.py
fe0dde
+++ b/ssg/build_remediations.py
fe0dde
@@ -290,7 +290,7 @@ def parse_from_file_with_jinja(self, env_yaml):
fe0dde
         for platform in rule_platforms:
fe0dde
             if platform == "machine":
fe0dde
                 # Based on check installed_env_is_a_container
fe0dde
-                platform_conditionals.append('[ ! -f /.dockerenv -a ! -f /run/.containerenv ]')
fe0dde
+                platform_conditionals.append('[ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]')
fe0dde
             elif platform is not None:
fe0dde
                 # Assume any other platform is a Package CPE
fe0dde