]> git.openstreetmap.org Git - chef.git/commitdiff
Fix attempt to dereference nil
authorTom Hughes <tom@compton.nu>
Tue, 18 Jun 2013 20:15:33 +0000 (21:15 +0100)
committerTom Hughes <tom@compton.nu>
Tue, 18 Jun 2013 20:15:33 +0000 (21:15 +0100)
cookbooks/dev/recipes/default.rb

index 39f99f6c71ccd05614f17d0f692d71036051c48d..b96f9291e342d5566704e77cbb062d44a58d2a56 100644 (file)
@@ -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}"