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

Format functiion does not allow json data functions

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Affects Version/s: 3.10.0, 3.10.1, 3.11.0, 3.10.2, 3.12.0, 3.10.3, 3.10.4, 3.12.0b1
    • Fix Version/s: None
    • Component/s: Built-in functions
    • Labels:
    • Platform:
      Any

      Description

      See example and discussion on the mailing list:

      Format accepts other functions, see:

      bundle agent main
      {
         reports:
           "CFEngine $(sys.cf_version)";
      
           "$(this.bundle): $(with)"
              with => format("BAS %S", readdata( "/tmp/example.json", "auto" ));
      }
      

      output:

         error: format() didn't have enough parameters
         error: format() didn't have enough parameters
      R: CFEngine 3.11.0
         error: format() didn't have enough parameters
         error: format() didn't have enough parameters
      R: main: $(with)
         error: format() didn't have enough parameters
         error: format() didn't have enough parameters
         error: format() didn't have enough parameters
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              bas Bas van der Vlies
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Summary Panel