Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-2055

@if macro causes extra new lines in output

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 3.7.3
    • Fix Version/s: 3.8.0, 3.7.8
    • Component/s: Parsing
    • Labels:
      None
    • Platform:
      Debian, Linux

      Description

      body common control
      {
      	bundlesequence => { "init", };
      }
      
      bundle agent init
      {
         vars:
            "greeting" string => "Hello World";
      
      @if minimum_version(9.9)
         Some new function here...
      @endif
      
         reports:
            "${greeting}";
      }
      

      Run it:

      neil@ettin ~/.cfagent/inputs $ cf-agent -Kf ./min_version.cf 
      
      
      
      
      R: Hello World
      

      This rendering does not show it, but there are extra blank lines between the prompt and the report output.

        Attachments

          Activity

            People

            • Assignee:
              a10040 Kristian Amlie
              Reporter:
              neilhwatson Neil Watson
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Summary Panel