1
0
Fork 0
mirror of https://github.com/sinatra/sinatra synced 2023-03-27 23:18:01 -04:00

converting env from command-line to symbol. [cypher]

This fixes the problem when running an app with -e development
This commit is contained in:
bmizerany 2008-06-22 17:48:31 -07:00
parent cb8441e0cb
commit 87f8cd3937

View file

@ -928,7 +928,7 @@ module Sinatra
require 'optparse'
OptionParser.new do |op|
op.on('-p port') { |port| default_options[:port] = port }
op.on('-e env') { |env| default_options[:env] = env }
op.on('-e env') { |env| default_options[:env] = env.to_sym }
op.on('-x') { default_options[:mutex] = true }
op.on('-s server') { |server| default_options[:server] = server }
end.parse!(ARGV.dup.select { |o| o !~ /--name/ })