~ ]$ knife ssh -m linhost -x user -i key.pem "sudo chef-client --force-logger -l info -o recipe[nosuch::recipel]"
[...]
linhost [2014-02-10T09:57:56-05:00] FATAL: Chef::Exceptions::RecipeNotFound: could not find recipe fooszl for cookbook affdex
~ ]$ echo $?
1
knife winrm -m winhost -x Administrator -P password "chef-client --force-logger -l info -o recipe[affdex::fooszl]"
[...]
winhost [2014-02-10T09:58:33-05:00] FATAL: Chef::Exceptions::RecipeNotFound: could not find recipe fooszl for cookbook affdex
~ ]$ echo $?
0
knife winrm --returns 0 -m winhost -x Administrator -P password "chef-client --force-logger -l info -o recipe[affdex::fooszl]"
[...]
winhost [2014-02-10T09:59:03-05:00] FATAL: Chef::Exceptions::RecipeNotFound: could not find recipe fooszl for cookbook affdex
ERROR: Failed to execute command on winhost return code 1
~ ]$ echo $?
0
Archive powered by MHonArc 2.6.16.