From e66ab79b8b5bc5311c750bf03868a7b2574f4ea1 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 26 Feb 2009 16:18:56 -0800 Subject: exec: disable embedded switch parsing in config.ru Since not all rackup command-line options can be supported by Unicorn, disable this gross hack to avoid potentially unpredictable or undefined behavior. config.ru will not be able to specify the config file for unicorn-specific options; but the unicorn-specific config files themselves will be allowed to override the default config.ru location. --- bin/unicorn | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/unicorn b/bin/unicorn index dd4cc64..0956d6f 100755 --- a/bin/unicorn +++ b/bin/unicorn @@ -114,9 +114,8 @@ abort "configuration file #{config} not found" unless File.exist?(config) if config =~ /\.ru$/ cfgfile = File.read(config) - # parse embedded command-line options in config.ru comments if cfgfile[/^#\\(.*)/] - opts.parse! $1.split(/\s+/) + warn %(not parsing embedded command-line options: "#$1") end inner_app = eval "Rack::Builder.new {(#{cfgfile}\n)}.to_app", nil, config else -- cgit v1.2.3-24-ge0c7