diff options
| author | Justin de Vesine | 2013-04-29 09:30:38 -0600 |
|---|---|---|
| committer | Adam Vandenberg | 2013-04-29 09:38:34 -0700 |
| commit | 10da58fe7fd5077233df47697e85e1062ae64392 (patch) | |
| tree | 62e99e2aecbfa2afe2c1325bd5baa9ccdda05772 /Library | |
| parent | b0683304da313bf0a481feba431e9b865a15a2a9 (diff) | |
| download | homebrew-10da58fe7fd5077233df47697e85e1062ae64392.tar.bz2 | |
mongodb: -f synonym for --config in mongod wrapper
mongodb also ignores spaces at the beginning but not at the end
of a command line argument: ' --config' and '--config' are
equivalent, but '--config ' is an invalid option.
Closes #19509.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/mongodb.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Library/Formula/mongodb.rb b/Library/Formula/mongodb.rb index 01b81d3f8..e06e06503 100644 --- a/Library/Formula/mongodb.rb +++ b/Library/Formula/mongodb.rb @@ -24,7 +24,9 @@ class Mongodb < Formula mv bin/'mongod', prefix (bin/'mongod').write <<-EOS.undent #!/usr/bin/env ruby - ARGV << '--config' << '#{etc}/mongod.conf' unless ARGV.find { |arg| arg =~ /\-\-config/ } + ARGV << '--config' << '#{etc}/mongod.conf' unless ARGV.find { |arg| + arg =~ /^\s*\-\-config$/ or arg =~ /^\s*\-f$/ + } exec "#{prefix}/mongod", *ARGV EOS |
