summaryrefslogtreecommitdiff
path: root/lib/rubygems/commands/server_command.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rubygems/commands/server_command.rb')
-rw-r--r--lib/rubygems/commands/server_command.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/rubygems/commands/server_command.rb b/lib/rubygems/commands/server_command.rb
index 1760700e27..0d18a82201 100644
--- a/lib/rubygems/commands/server_command.rb
+++ b/lib/rubygems/commands/server_command.rb
@@ -1,3 +1,9 @@
+######################################################################
+# This file is imported from the rubygems project.
+# DO NOT make modifications in this repo. They _will_ be reverted!
+# File a patch instead and assign it to Ryan Davis or Eric Hodel.
+######################################################################
+
require 'rubygems/command'
require 'rubygems/server'
@@ -43,6 +49,14 @@ class Gem::Commands::ServerCommand < Gem::Command
options[:addresses] ||= []
options[:addresses].push(*address)
end
+
+ add_option '-l', '--launch[=COMMAND]',
+ 'launches a browser window',
+ "COMMAND defaults to 'start' on Windows",
+ "and 'open' on all other platforms" do |launch, options|
+ launch ||= Gem.win_platform? ? 'start' : 'open'
+ options[:launch] = launch
+ end
end
def defaults_str # :nodoc: