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

'@(...)' is not a valid rval for vars promises / constraints

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Open
    • Priority: Higher
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Parsing
    • Labels:
      None

      Description

      The following policy fails to parse with a syntax error:

      bundle agent __main__ {
        vars:
            "sw" data => parsejson('{
                                      "sw1": {
                                        "packages": [ "pkg1", "pkg2" ]
                                      }
                                    }');
      
            "items" slist => @(sw[sw1][packages]);
        reports:
            "$(items)";
      }
      

      Various modifications (adding brackets, curly braces, quotes,...) of this also fail.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                vpodzime Vratislav Podzimek
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Summary Panel