Merge pull request #12207 from oo6/master

Handle the case superclass is a subclass of Formula
This commit is contained in:
Mike McQuaid 2021-10-08 17:19:17 +01:00 committed by GitHub
commit 650ccde8f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -240,9 +240,10 @@ module Homebrew
def github_info(f)
return f.path if f.tap.blank? || f.tap.remote.blank?
path = if f.class.superclass == Formula
path = case f
when Formula
f.path.relative_path_from(f.tap.path)
elsif f.is_a?(Cask::Cask)
when Cask::Cask
f.sourcefile_path.relative_path_from(f.tap.path)
end
github_remote_path(f.tap.remote, path)