1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Fix 'rails server -h' double help banner. Correct its usage line. [#3874 status:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
This commit is contained in:
Henrik N 2010-02-06 12:48:02 +01:00 committed by José Valim
parent 22c0390085
commit 95b63c6a07

View file

@ -9,6 +9,7 @@ module Rails
options = {}
args = args.dup
opt_parser = OptionParser.new do |opts|
opts.banner = "Usage: rails server [options]"
opts.on("-p", "--port=port", Integer,
"Runs Rails on the specified port.", "Default: #{options[:Port]}") { |v| options[:Port] = v }
opts.on("-b", "--binding=ip", String,
@ -48,7 +49,9 @@ module Rails
super
ensure
puts 'Exiting' unless options[:daemonize]
# The '-h' option calls exit before @options is set.
# If we call 'options' with it unset, we get double help banners.
puts 'Exiting' unless @options && options[:daemonize]
end
def middleware