0
我需要在我將創建的文件中獲取文件內容。 我的代碼:廚師:我如何獲得文件內容到一個變量,但文件還不存在
execute "foo" do
command "echo "Hello World > /tmp/foo"
action :run
end
variable = shell_out!("cat /tmp/foo").stdout
埃羅
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