aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorJack Nagel2014-03-26 16:24:20 -0500
committerJack Nagel2014-03-26 16:24:20 -0500
commit930a1823e211c24509a2cd7bdacc02b4b0462c73 (patch)
treee807e2d0c840dce09b25cdb493bc6950a919edad /Library/Formula
parent4ae9cc42734217e7ff8bf409879a4a3857e86199 (diff)
downloadhomebrew-930a1823e211c24509a2cd7bdacc02b4b0462c73.tar.bz2
openssl: use atomic_write to install cert file
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/openssl.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/Library/Formula/openssl.rb b/Library/Formula/openssl.rb
index d53b8196b..854be71cf 100644
--- a/Library/Formula/openssl.rb
+++ b/Library/Formula/openssl.rb
@@ -59,9 +59,12 @@ class Openssl < Formula
end
def write_pem_file
- system "security find-certificate -a -p /Library/Keychains/System.keychain > '#{osx_cert_pem}.tmp'"
- system "security find-certificate -a -p /System/Library/Keychains/SystemRootCertificates.keychain >> '#{osx_cert_pem}.tmp'"
- system "mv", "-f", "#{osx_cert_pem}.tmp", osx_cert_pem
+ keychains = %w[
+ /Library/Keychains/System.keychain
+ /System/Library/Keychains/SystemRootCertificates.keychain
+ ]
+
+ osx_cert_pem.atomic_write `security find-certificate -a -p #{keychains.join(" ")}`
end
def post_install