aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/nss.rb
diff options
context:
space:
mode:
authorJack Nagel2012-05-15 13:31:21 -0500
committerJack Nagel2012-05-15 14:03:11 -0500
commit417d7880702a645a5efd272a42dd03a8e7419035 (patch)
tree62ec77b19613a1a35f82011c3d931f5409e69384 /Library/Formula/nss.rb
parent5d3217437e0455f143d33061718fbea0c6ee0277 (diff)
downloadhomebrew-417d7880702a645a5efd272a42dd03a8e7419035.tar.bz2
Shore up a number of shell quoting issues
When interpolating in strings passed to Formula#system, it should be done in such a way that if any interpolated variables contain spaces, they are either (a) passed as part of a list or (b) protected by quotes if they are part of a long string (which is subject to shell expansion). Otherwise, they will be split on the space when expanded by the shell and passed as multiple arguments to whatever process is being executed. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Formula/nss.rb')
-rw-r--r--Library/Formula/nss.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/Library/Formula/nss.rb b/Library/Formula/nss.rb
index d16b6dd73..c11606813 100644
--- a/Library/Formula/nss.rb
+++ b/Library/Formula/nss.rb
@@ -20,7 +20,7 @@ class Nss < Formula
]
args << 'USE_64=1' if MacOS.prefer_64_bit?
- system "make build_coreconf build_dbm all -C mozilla/security/nss #{args.join ' '}"
+ system "make", "build_coreconf", "build_dbm", "all", "-C", "mozilla/security/nss", *args
# We need to use cp here because all files get cross-linked into the dist
# hierarchy, and Homebrew's Pathname.install moves the symlink into the keg
@@ -52,8 +52,8 @@ class Nss < Formula
# See: http://www.mozilla.org/projects/security/pki/nss/tools/certutil.html
mktemp do
File.open('passwd', 'w') {|f| f.write("It's a secret to everyone.") }
- system "#{bin}/certutil -N -d #{Dir.getwd} -f passwd"
- system "#{bin}/certutil -L -d #{Dir.getwd}"
+ system "#{bin}/certutil", "-N", "-d", pwd, "-f", "passwd"
+ system "#{bin}/certutil", "-L", "-d", pwd
end
end