Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-8243

Allow ERB templates to be tolerant of a leading BOM

    XMLWordPrintable

    Details

    • Template:
    • Acceptance Criteria:
      Hide

      An ERB template with a leading BOM should work properly in the PowerShell module

      Show
      An ERB template with a leading BOM should work properly in the PowerShell module
    • Team:
      Coremunity
    • Sprint:
      Platform Core KANBAN
    • Release Notes:
      Enhancement
    • Release Notes Summary:
      Previously, if a template contained a BOM, then it was preserved by the `template` function, and would end up in the resulting file or PowerShell command. Now we pass the `bom` option when reading the file, which strips the BOM as it is read.
    • QA Risk Assessment:
      Needs Assessment

      Description

      See additional details in MODULES-1996 / PUP-6447.

      The basic gist is that internal calls to read, like the one made by template loading with Puppet::FileSystem.read_preserve_line_endings, do not specify the "allow bom" flag when reading UTF-8 files.

      This should be a straightforward addition that allows templates (for instance PowerShell templates that were once PS1 files created by PowerShell ISE that have a leading BOM) to properly remove the leading BOM.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              josh Josh Cooper
              Reporter:
              ethan Ethan Brown
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support