Browse files

Fix issue where empty list of servers would generate a single invalid…

… server entry for memcache.yml
  • Loading branch information...
1 parent badf11e commit 10e43aa759ef64e62bbbe176ae934d028327124b @dennisjbell dennisjbell committed Jun 12, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 cookbooks/memcached/templates/default/memcached.yml.erb
View
6 cookbooks/memcached/templates/default/memcached.yml.erb
@@ -21,7 +21,9 @@ defaults:
benchmarking: false
sessions: false
fragments: true
- <% unless @server_names.nil? %>
+ <% if !@server_names.nil? && !@server_names.empty? %>
servers:
- - <%= @server_names.join(":11211\n - ") %>:11211
+ <% @server_names.each do |server_name| %>
+ - <%= server_name %>:11211
+ <% end %>
<% end %>

0 comments on commit 10e43aa

Please sign in to comment.