Handle the case superclass is a subclass of Formula

This commit is contained in:
Milo Lee
2021-10-08 10:13:29 +08:00
parent a365770446
commit 5cedb75a62
+1 -1
View File
@@ -240,7 +240,7 @@ module Homebrew
def github_info(f)
return f.path if f.tap.blank? || f.tap.remote.blank?
path = if f.class.superclass == Formula
path = if f.is_a?(Formula)
f.path.relative_path_from(f.tap.path)
elsif f.is_a?(Cask::Cask)
f.sourcefile_path.relative_path_from(f.tap.path)