summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre IGNJATOVIC <alexandre.ignjatovic@doctolib.com>2018-10-04 13:14:26 +0200
committerAlexandre Ignjatovic <alexandre.ignjatovic@gmail.com>2018-10-04 20:58:14 +0200
commita245100e1e2ecb4bba2209a3ca1f9a3744be7cc9 (patch)
tree7e01aa3bc58ff1714da2468cb6b29579bc7b108b
parent9a8182d5559395f0b1b36bafd62af6e5a626ad8c (diff)
downloadchef-a245100e1e2ecb4bba2209a3ca1f9a3744be7cc9.tar.gz
better docs for Chef::Knife::Bootstrap#validate_options!
Signed-off-by: Alexandre Ignjatovic <alexandre.ignjatovic@gmail.com>
-rw-r--r--lib/chef/knife/bootstrap.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/chef/knife/bootstrap.rb b/lib/chef/knife/bootstrap.rb
index 19a7d6543e..bdeee3394b 100644
--- a/lib/chef/knife/bootstrap.rb
+++ b/lib/chef/knife/bootstrap.rb
@@ -409,7 +409,13 @@ class Chef
end
end
- # make sure policyfile values are set correctly
+ # Ensure options are valid by checking policyfile values.
+ #
+ # The method call will cause the program to exit(1) if:
+ # * Only one of --policy-name and --policy-group is specified
+ # * Policyfile options are set and --run-list is set as well
+ #
+ # @return [TrueClass] If options are valid.
def validate_options!
if incomplete_policyfile_options?
ui.error("--policy-name and --policy-group must be specified together")