From: Tom Hughes Date: Tue, 18 Jun 2013 20:15:33 +0000 (+0100) Subject: Fix attempt to dereference nil X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/3b6c4a7fde47963091251384cbb2749445488cf8 Fix attempt to dereference nil --- diff --git a/cookbooks/dev/recipes/default.rb b/cookbooks/dev/recipes/default.rb index 39f99f6c7..b96f9291e 100644 --- a/cookbooks/dev/recipes/default.rb +++ b/cookbooks/dev/recipes/default.rb @@ -105,7 +105,7 @@ end search(:accounts, "*:*").each do |account| name = account["id"] - details = node[:accounts][:users][name] + details = node[:accounts][:users][name] || {} if ["user","administrator"].include?(details[:status]) user_home = details[:home] || account["home"] || "#{node[:accounts][:home]}/#{name.to_s}"