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

[rubygems/rubygems] Check not having load system features also for successful runs

https://github.com/rubygems/rubygems/commit/4807bd19a5
This commit is contained in:
David Rodríguez 2021-08-05 16:54:30 +02:00 committed by git
parent d49ee9e2c3
commit b2b473707f

View file

@ -24,12 +24,6 @@ class RubygemsVersionManager
def assert_system_features_not_loaded!
at_exit do
errors = if $!.nil?
""
else
all_commands_output
end
rubylibdir = RbConfig::CONFIG["rubylibdir"]
rubygems_path = rubylibdir + "/rubygems"
@ -43,11 +37,11 @@ class RubygemsVersionManager
(loaded_feature.start_with?(bundler_path) && !bundler_exemptions.any? {|bundler_exemption| loaded_feature.start_with?(bundler_exemption) })
end
if bad_loaded_features.any?
errors += "the following features were incorrectly loaded:\n#{bad_loaded_features.join("\n")}"
errors = if bad_loaded_features.any?
all_commands_output + "the following features were incorrectly loaded:\n#{bad_loaded_features.join("\n")}"
end
raise errors unless errors.empty?
raise errors if errors
end
end