utils/gems: add dependencies to LOAD_PATH.

This commit is contained in:
Mike McQuaid 2021-03-26 20:36:26 +00:00
parent 5e0b08dd01
commit c3ea073a07
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70

View File

@ -88,7 +88,10 @@ module Homebrew
specs = Gem.install name, version, document: []
end
# Add the new specs to the $LOAD_PATH.
specs += specs.flat_map(&:runtime_dependencies)
.flat_map(&:to_specs)
# Add the specs to the $LOAD_PATH.
specs.each do |spec|
spec.require_paths.each do |path|
full_path = File.join(spec.full_gem_path, path)