Skip to content

Commit

Permalink
Only mark certs for update if the directory exists
Browse files Browse the repository at this point in the history
Marking for update only makes sense if the directory exists. Otherwise
it'll simply be generated. This avoids a bug where file creation fails.
  • Loading branch information
ekohl committed Jul 16, 2024
1 parent 2ec4fbd commit 862f5e7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hooks/pre/20-certs_update.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

def mark_for_update(cert_name, hostname = nil)
path = File.join(*[SSL_BUILD_DIR, hostname, cert_name].compact)
return unless File.exist?(File.dirname(path))

if app_value(:noop)
puts "Marking certificate #{path} for update (noop)"
else
Expand Down

0 comments on commit 862f5e7

Please sign in to comment.