diff options
Diffstat (limited to 'lib/chef/knife/cookbook_show.rb')
-rw-r--r-- | lib/chef/knife/cookbook_show.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/chef/knife/cookbook_show.rb b/lib/chef/knife/cookbook_show.rb index d0c930de0a..1d9983632d 100644 --- a/lib/chef/knife/cookbook_show.rb +++ b/lib/chef/knife/cookbook_show.rb @@ -76,9 +76,13 @@ class Chef pretty_print(temp_file.read) when 3 # We are showing a specific part of the cookbook - output(cookbook.manifest[segment]) - when 2 # We are showing the whole cookbook data - output(cookbook) + if segment == "metadata" + output(cookbook.metadata) + else + output(cookbook.files_for(segment)) + end + when 2 # We are showing the whole cookbook + output(cookbook.display) when 1 # We are showing the cookbook versions (all of them) env = config[:environment] api_endpoint = env ? "environments/#{env}/cookbooks/#{cookbook_name}" : "cookbooks/#{cookbook_name}" |