Skip to content

Commit

Permalink
Only include database recipe if databases are defined
Browse files Browse the repository at this point in the history
Check on a empty array condition always return truthy results.

Evaluate if list of databases are empty instead.
  • Loading branch information
luislavena committed May 23, 2013
1 parent eb2febb commit 40baeba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
#
#

if node["databox"]["databases"]["mysql"]
if node["databox"]["databases"]["mysql"].any?
include_recipe "databox::mysql"
end

if node["databox"]["databases"]["postgresql"]
if node["databox"]["databases"]["postgresql"].any?
include_recipe "databox::postgresql"
end

0 comments on commit 40baeba

Please sign in to comment.