From db2cd528427d60d4a0e7c9bccd3011e8d2213248 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Thu, 29 Mar 2018 21:49:30 +0200 Subject: [PATCH] Use `TapPathLoader` in more cases. --- Library/Homebrew/cask/lib/hbc/cask_loader.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/cask/lib/hbc/cask_loader.rb b/Library/Homebrew/cask/lib/hbc/cask_loader.rb index 640282ec36..450aa13ba6 100644 --- a/Library/Homebrew/cask/lib/hbc/cask_loader.rb +++ b/Library/Homebrew/cask/lib/hbc/cask_loader.rb @@ -97,13 +97,13 @@ module Hbc class FromTapPathLoader < FromPathLoader 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 attr_reader :tap def initialize(tap_path) - @tap = Tap.from_path(tap_path) + @tap = Tap.from_path(File.expand_path(tap_path)) super tap_path end