Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 0.10.10
-
Fix Version/s: None
-
Component/s: Chef Shell
-
Labels:None
Description
I'm trying to write a test to see if a node has an empty run list. It looked like such a test would be as simple as this:
shef -z -c /etc/chef/client.rb <<<"if node.run_list.empty? then exit 1 end"
However, here's what actually happens:
# shef -z -c /etc/chef/client.rb <<<"if node.run_list.empty? then exit 1 end" loading configuration: /etc/chef/client.rb Session type: client Loading......[2012-06-15T18:34:14+00:00] INFO: Run List is [] [2012-06-15T18:34:14+00:00] INFO: Run List expands to [] .[2012-06-15T18:34:15+00:00] INFO: Loading cookbooks [] done. This is shef, the Chef shell. Chef Version: 0.10.10 http://www.opscode.com/chef http://wiki.opscode.com/display/chef/Home run `help' for help, `exit' or ^D to quit. Ohai2u ec2-user@ip-10-73-18-55.ec2.internal! chef > if node.run_list.empty? then exit 1 end # echo $? 0
It looks like irb has the same behavior, so if shef is piggybacking on irb, then irb code is likely at fault.
Activity
- All
- Comments
- History
- Activity
- Transitions Summary