Je dois obtenir un contenu de fichier dans un fichier que je vais créer. Mon code:Chef: Comment obtenir le contenu d'un fichier dans une variable, mais le fichier n'existe pas encore
execute "foo" do
command "echo "Hello World > /tmp/foo"
action :run
end
variable = shell_out!("cat /tmp/foo").stdout
Erro
ERROR: Expected process to exit with [0], but received '1'
---- Begin output of cat /tmp/foo ----
STDOUT:
STDERR: cat: /tmp/foo: No such file or directory
---- End output of cat /tmp/foo ----
Ran cat /tmp/data.uuid returned 1