Use TapPathLoader in more cases.

This commit is contained in:
Markus Reiter 2018-03-29 21:49:30 +02:00
parent cd30820def
commit db2cd52842

View File

@ -97,13 +97,13 @@ module Hbc
class FromTapPathLoader < FromPathLoader class FromTapPathLoader < FromPathLoader
def self.can_load?(ref) def self.can_load?(ref)
ref.to_s.match?(HOMEBREW_TAP_PATH_REGEX) && super File.expand_path(ref).match?(HOMEBREW_TAP_PATH_REGEX) && super
end end
attr_reader :tap attr_reader :tap
def initialize(tap_path) def initialize(tap_path)
@tap = Tap.from_path(tap_path) @tap = Tap.from_path(File.expand_path(tap_path))
super tap_path super tap_path
end end