summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThom May <thom@chef.io>2015-12-14 10:45:39 +0000
committerThom May <thom@chef.io>2015-12-14 10:45:39 +0000
commitca87eb735b562b0c835a1a044f60f98bc4dedf4b (patch)
treebe96368fc790590c14082b63e98e6a9bfc35641d
parentf08d833465d9d2ea083d12a66958753afa2b1c7e (diff)
downloadchef-tm/fix_node_presenter.tar.gz
Don't crash if the node has no tags settm/fix_node_presenter
-rw-r--r--lib/chef/knife/core/node_presenter.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/chef/knife/core/node_presenter.rb b/lib/chef/knife/core/node_presenter.rb
index 5192c53f51..f65619298a 100644
--- a/lib/chef/knife/core/node_presenter.rb
+++ b/lib/chef/knife/core/node_presenter.rb
@@ -125,8 +125,12 @@ ROLES
summarized << <<-SUMMARY
#{key('Recipes:')} #{Array(node[:recipes]).join(', ')}
#{key('Platform:')} #{node[:platform]} #{node[:platform_version]}
+SUMMARY
+ unless node.tags.nil?
+ summarized << <<-SUMMARY
#{key('Tags:')} #{node.tags.join(', ')}
SUMMARY
+ end
if config[:medium_output] || config[:long_output]
summarized +=<<-MORE
#{key('Attributes:')}