【发布时间】:2017-12-19 22:32:56
【问题描述】:
我需要在我将创建的文件中获取文件内容。 我的代码:
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
【问题讨论】:
标签: ruby chef-infra chef-recipe recipe