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

not() does not return the correct type for and =>

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.17.0
    • Component/s: None
    • Labels:
      None
    • Story Points:
      2

      Description

      This should work:

      bundle agent main
      {
        classes:
          "ok"
            and => {
              fileexists("/tmp/file-0"),
              not(fileexists("/tmp/file-1")),
            };
      }

      But it doesn't:

      root@dev core $ /var/cfengine/bin/cf-agent test.cf
      test.cf:8:8: error: Function does not return the required type
            };
             ^
         error: There are syntax errors in policy files
         error: Policy failed validation with command '"/var/cfengine/bin/cf-promises" -c "test.cf"'
         error: Failsafe condition triggered. Interactive session detected, skipping failsafe.cf execution.
         error: Error reading CFEngine policy. Exiting...
      root@dev core $
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                olehermanse Ole Herman Schumacher Elgesem
                Reporter:
                olehermanse Ole Herman Schumacher Elgesem
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: