Skip to content

Instantly share code, notes, and snippets.

@nickanderson
Created August 8, 2022 18:19
Show Gist options
  • Save nickanderson/96a31be10de92324b0c86061bd43d697 to your computer and use it in GitHub Desktop.
Save nickanderson/96a31be10de92324b0c86061bd43d697 to your computer and use it in GitHub Desktop.

this.promiser does work in files promises. but not necessarily EVERYWHERE, so where it does not work you need to open a ticket. It’s really helpful if you provide standalone examples illustrating specific places it does not work, and better yet if they come in the form of an acceptance test.

bundle agent __main__
{
  files:
    "/tmp/test0.txt" content => "Goodbye";

    "/tmp/test0.txt"
      content => "HELLO",
      unless => fileexists( $(this.promiser) );
   reports:
     "/tmp/test0.txt" printfile => cat( $(this.promiser) );
}
    info: Created file '/tmp/test0.txt', mode 0600
    info: Updated file '/tmp/test0.txt' with content 'Goodbye'
R: /tmp/test0.txt
R: Goodbye
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment