Allow strings to be passed, too

This commit is contained in:
Rylan Polster 2021-06-15 11:32:04 -04:00
parent 75c1a23f63
commit 618c41926b
No known key found for this signature in database
GPG Key ID: 46A744940CFF4D64

View File

@ -424,7 +424,7 @@ module Formulary
# @param bottle a path pointing to the target bottle archive. # @param bottle a path pointing to the target bottle archive.
def self.map_name_to_bottle(name, bottle) def self.map_name_to_bottle(name, bottle)
@name_mappings ||= {} @name_mappings ||= {}
@name_mappings[name] = bottle.realpath @name_mappings[name] = Pathname(bottle).realpath
end end
# Return a {Formula} instance for the given rack. # Return a {Formula} instance for the given rack.