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 Homebrew/homebrew#19509. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
This commit is contained in:
parent
ef268189ce
commit
cd7a5c2c46
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue