From 9c4e7c09efda41b4d5250b962003a713a4474726 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C4=8Cern=C3=BD?= Date: Mon, 10 Feb 2025 16:50:29 +0100 Subject: [PATCH] Wrap condition in curly braces Wrap condition in curly braces to prevent operator priority problems when the macro is used as a part of a bigger expression. --- shared/macros/10-bash.jinja | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shared/macros/10-bash.jinja b/shared/macros/10-bash.jinja index 8a05c7540b0..f75d7f6c8dc 100644 --- a/shared/macros/10-bash.jinja +++ b/shared/macros/10-bash.jinja @@ -2669,7 +2669,7 @@ This macro defines a conditional expression that is evaluated as true if the remediation is performed during a build of a bootable container image. #}} {{%- macro bash_bootc_build() -%}} -rpm --quiet -q kernel rpm-ostree bootc && ! rpm --quiet -q openshift-kubelet && { [ -f "/run/.containerenv" ] || [ -f "/.containerenv" ]; } +{ rpm --quiet -q kernel rpm-ostree bootc && ! rpm --quiet -q openshift-kubelet && { [ -f "/run/.containerenv" ] || [ -f "/.containerenv" ]; }; } {{%- endmacro -%}} {{# @@ -2677,7 +2677,7 @@ This macro defines a conditional expression that is evaluated as true if the remediation is not performed during a build of a bootable container image. #}} {{%- macro bash_not_bootc_build() -%}} -! ( {{{ bash_bootc_build() }}} ) +! {{{ bash_bootc_build() }}} {{%- endmacro -%}}