summaryrefslogtreecommitdiff
path: root/lib/chef/knife.rb
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2019-07-02 15:09:07 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2019-07-02 15:09:07 -0700
commit7a1a6c8ef26c787e4b6dd1602f3d158b37e81720 (patch)
tree1e390cd535b38368d091cbb33e5d419408d5ce00 /lib/chef/knife.rb
parent77f8739a4741e2370e40ec39345a92a6ea393a1a (diff)
downloadchef-7a1a6c8ef26c787e4b6dd1602f3d158b37e81720.tar.gz
fix Layout/EmptyLineAfterGuardClause
i like this one, gives visual priority to returns or raises that are buried in the middle of things. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/knife.rb')
-rw-r--r--lib/chef/knife.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/chef/knife.rb b/lib/chef/knife.rb
index 48226bb344..02f38e9f89 100644
--- a/lib/chef/knife.rb
+++ b/lib/chef/knife.rb
@@ -244,6 +244,7 @@ class Chef
msg "Available #{category_desc}subcommands: (for details, knife SUB-COMMAND --help)\n\n"
subcommand_loader.list_commands(preferred_category).sort.each do |category, commands|
next if category =~ /deprecated/i
+
msg "** #{category.upcase} COMMANDS **"
commands.sort.each do |command|
subcommand_loader.load_command(command)
@@ -386,6 +387,7 @@ class Chef
return :cli if @original_config.include? key
return :config if config_file_settings.key? key
return :cli_default if default_config.include? key
+
nil
end
@@ -476,6 +478,7 @@ class Chef
end
rescue Exception => e
raise if raise_exception || ( Chef::Config[:verbosity] && Chef::Config[:verbosity] >= 2 )
+
humanize_exception(e)
exit 100
end