From 10da58fe7fd5077233df47697e85e1062ae64392 Mon Sep 17 00:00:00 2001 From: Justin de Vesine Date: Mon, 29 Apr 2013 09:30:38 -0600 Subject: 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 --- Library/Formula/mongodb.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Library') 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 -- cgit v1.2.3