Skip to content

Commit

Permalink
Honour the no_quotes paramter of oval_check_dropin_file macro
Browse files Browse the repository at this point in the history
Handle correctly the no_quotes parameter of the macro, so it affects the quotes parameter of called oval_line_in_file_state macro
Thanks to @marcusburghardt and @vojtapolasek for their feedback on this in context of ComplianceAsCode#12054 🙇
  • Loading branch information
teacup-on-rockingchair committed Jul 17, 2024
1 parent 520a196 commit 8a3083c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions shared/macros/10-oval.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,12 @@ Generates the :code:`<affected>` tag for OVAL check using correct product platfo
</criteria>
{{%- endif %}}
</definition>

{{%- set quotes = "'\"" -%}}
{{%- if no_quotes == "true" %}}
{{%- set quotes = "" -%}}
{{%- endif %}}

{{{ oval_line_in_file_test(path, parameter) }}}
{{{ oval_line_in_file_object(path, section, prefix_regex, parameter, separator_regex, false, multi_value) }}}
{{{ oval_line_in_file_state(value, multi_value, quotes) }}}
Expand Down

0 comments on commit 8a3083c

Please sign in to comment.