When I wanted to test some new chef code I had written, I found what looks like an error to me.
I have reduced it down to the recipe shown at:
If I move the # to choose the other commandname, everything works as expected, and all the files contain a "2" afterwards.
When I use that recipe in a test kitchen, the execute ressource fails, because the file content is "1", when it is run (that's the condition that causes it to fail), but it has 'action :nothing' and the file ressource above (yes, it's the same file as at the top - I know that is generally wrong but this is reduced from a testing scenario) should change the content to a "2".
So am I doing something wrong (although this looks simple, and works with another command), or is chef actually behaving erractically? If so, is it fixed in a newer chef (I can see on the homepage that although we have a 16. version in those kitchen, it's not the newest).