itamae-kitchen / itamae

Configuration management tool inspired by Chef, but simpler and lightweight. Formerly known as Lightchef.

Home Page:https://itamae.kitchen/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A file with content "" is not created

k0kubun opened this issue · comments

$ cat /tmp/empty
cat: /tmp/empty: No such file or directory

$ cat a.rb
file '/tmp/empty' do
  content ''
end

$ itamae version
Itamae v1.9.11

$ itamae local a.rb
 INFO : Starting Itamae...
 INFO : Recipe: /private/tmp/a.rb
 INFO :   file[/tmp/empty] exist will change from 'false' to 'true'

$ cat /tmp/empty
cat: /tmp/empty: No such file or directory

In mitamae, it's fixed in v1.6.3 with https://github.com/itamae-kitchen/mitamae/blob/fb41394a4da842db3139ef24c8cf25be8f337ef7/mrblib/mitamae/resource_executor/file.rb#L105-L110