summaryrefslogtreecommitdiff
path: root/lib/rubygems/commands/install_command.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-08 23:41:14 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-08 23:41:14 +0000
commit05ba6fffcc6414e2940acf7c918821d832d7b30d (patch)
treea86e3d20d1a9a64024bf82700c7d5c53cfe9d74d /lib/rubygems/commands/install_command.rb
parent599dbf65a57ad7ce37a3dd23d3513ef2699eb9b2 (diff)
* lib/rubygems: Update to RubyGems master bf37240. Fixes useless
error message with `gem install -g` with no gem dependencies file. * test/rubygems: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/commands/install_command.rb')
-rw-r--r--lib/rubygems/commands/install_command.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/rubygems/commands/install_command.rb b/lib/rubygems/commands/install_command.rb
index 68a2fad129..d2dd7ac920 100644
--- a/lib/rubygems/commands/install_command.rb
+++ b/lib/rubygems/commands/install_command.rb
@@ -40,6 +40,13 @@ class Gem::Commands::InstallCommand < Gem::Command
File.exist? file
end unless v
+ unless v then
+ message = v ? v : "(tried #{Gem::GEM_DEP_FILES.join ', '})"
+
+ raise OptionParser::InvalidArgument,
+ "cannot find gem dependencies file #{message}"
+ end
+
o[:gemdeps] = v
end