覆盖chef bash返回代码

前端之家收集整理的这篇文章主要介绍了覆盖chef bash返回代码前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在运行一个厨师收件人来安装Websphere fixpacks. fixpack retuns和exitcode [2]用于部分安装.这是一种预期的行为,但厨师只是将其视为错误.有没有办法覆盖它.

我希望厨师继续完成下一个任务,即使返回退出代码是[2]

================================================================================
Error executing action `run` on resource 'bash[was-install-fixpacks]'
================================================================================


Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0],but received '2'
快速浏览一下 documentation可以看出参数返回:

The return value for a command. This may be an array of accepted values. An exception is raised when the return value(s) do not match. Default value: 0.

例:

bash "was-install-fixpacks" do
  command ..
  returns [0,2]
end

猜你在找的Bash相关文章