diff options
author | danielsdeleo <dan@chef.io> | 2015-11-05 17:29:18 -0800 |
---|---|---|
committer | danielsdeleo <dan@chef.io> | 2015-11-05 17:29:18 -0800 |
commit | 2e9789882242f62d60dc687a68b31c4b2488def7 (patch) | |
tree | 64751578e09d6c76519e5cb99deb0a45edaeb2c8 /lib/chef/knife/bootstrap.rb | |
parent | 2e09c06915ca8602223d83bf351d439d5c7e9e4f (diff) | |
download | chef-2e9789882242f62d60dc687a68b31c4b2488def7.tar.gz |
Handle nil run list option in knife bootstrapnil-run-list-bootstrap
Diffstat (limited to 'lib/chef/knife/bootstrap.rb')
-rw-r--r-- | lib/chef/knife/bootstrap.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/chef/knife/bootstrap.rb b/lib/chef/knife/bootstrap.rb index 8502ccb8eb..6830342b89 100644 --- a/lib/chef/knife/bootstrap.rb +++ b/lib/chef/knife/bootstrap.rb @@ -455,7 +455,15 @@ class Chef # True if policy_name and run_list are both given def policyfile_and_run_list_given? - !config[:run_list].empty? && !!config[:policy_name] + run_list_given? && policyfile_options_given? + end + + def run_list_given? + !config[:run_list].nil? && !config[:run_list].empty? + end + + def policyfile_options_given? + !!config[:policy_name] end # True if one of policy_name or policy_group was given, but not both |