From: Tom Hughes Date: Thu, 16 Jan 2020 22:34:29 +0000 (+0000) Subject: Avoid exception iterating a non-existent directory X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/9de17ece169e2c0f91c5545b328fc0cc2fc6a0f4 Avoid exception iterating a non-existent directory --- diff --git a/cookbooks/letsencrypt/recipes/default.rb b/cookbooks/letsencrypt/recipes/default.rb index 42d1e4678..05b1c0fa8 100644 --- a/cookbooks/letsencrypt/recipes/default.rb +++ b/cookbooks/letsencrypt/recipes/default.rb @@ -150,7 +150,7 @@ certificates.each do |name, details| end end -Dir.each_child("/srv/acme.openstreetmap.org/requests") do |name| +Dir.glob("*", :base => "/srv/acme.openstreetmap.org/requests") do |name| next if certificates.include?(name) file "/srv/acme.openstreetmap.org/requests/#{name}" do