We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fc08f72 commit 83456d1Copy full SHA for 83456d1
lib/rubygems/command_manager.rb
@@ -232,9 +232,14 @@ def load_and_instantiate(command_name)
232
const_name = command_name.capitalize.gsub(/_(.)/) { $1.upcase } << "Command"
233
234
begin
235
- require "rubygems/commands/#{command_name}_command"
+ begin
236
+ require "rubygems/commands/#{command_name}_command"
237
+ rescue LoadError
238
+ # it may have been defined from a rubygems_plugin.rb file
239
+ end
240
+
241
Gem::Commands.const_get(const_name).new
- rescue StandardError, LoadError => e
242
+ rescue StandardError => e
243
alert_error clean_text("Loading command: #{command_name} (#{e.class})\n\t#{e}")
244
ui.backtrace e
245
end
0 commit comments