summaryrefslogtreecommitdiff
path: root/lib/rubygems/gem_runner.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rubygems/gem_runner.rb')
-rw-r--r--lib/rubygems/gem_runner.rb15
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/rubygems/gem_runner.rb b/lib/rubygems/gem_runner.rb
index 31890a60d7..8335a0ad03 100644
--- a/lib/rubygems/gem_runner.rb
+++ b/lib/rubygems/gem_runner.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
@@ -32,7 +33,11 @@ class Gem::GemRunner
do_configuration args
- Gem.load_env_plugins rescue nil
+ begin
+ Gem.load_env_plugins
+ rescue StandardError
+ nil
+ end
Gem.load_plugins
cmd = @command_manager_class.instance
@@ -40,10 +45,10 @@ class Gem::GemRunner
cmd.command_names.each do |command_name|
config_args = Gem.configuration[command_name]
config_args = case config_args
- when String
- config_args.split " "
- else
- Array(config_args)
+ when String
+ config_args.split " "
+ else
+ Array(config_args)
end
Gem::Command.add_specific_extra_args command_name, config_args
end