summaryrefslogtreecommitdiff
path: root/tasks
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-05-01 13:57:58 -0700
committerTim Smith <tsmith84@gmail.com>2020-05-01 13:57:58 -0700
commit6d5c8a528a8cd93335345aa27791f15bf1d7341b (patch)
treed07026d6abaa6ec6c11246de1f7175fcb42ffc68 /tasks
parent94c3519d49986df95b1ab3221b6cc7886245abce (diff)
downloadchef-6d5c8a528a8cd93335345aa27791f15bf1d7341b.tar.gz
Handle the scenario where there are no properties better
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'tasks')
-rwxr-xr-xtasks/docs.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/tasks/docs.rb b/tasks/docs.rb
index 1ab9153aea..b27f469532 100755
--- a/tasks/docs.rb
+++ b/tasks/docs.rb
@@ -55,12 +55,16 @@ namespace :docs_site do
end
def friendly_full_property_list(name, properties)
- [
+ prop_list = [
"`#{name}` is the resource.",
"`name` is the name given to the resource block.",
- "`action` identifies which steps Chef Infra Client will take to bring the node into the desired state.",
- friendly_property_list(properties),
+ "`action` identifies which steps Chef Infra Client will take to bring the node into the desired state."
]
+
+ # handle the case where we have no properties
+ prop_list << friendly_property_list(properties) unless properties.empty?
+
+ prop_list
end
# given an array of properties print out a single comma separated string