Fix brew info --github

This commit is contained in:
Rylan Polster 2024-07-04 12:07:53 -04:00
parent c16a9b33b2
commit 6ecdad7379
No known key found for this signature in database
GPG Key ID: 46A744940CFF4D64

View File

@ -249,7 +249,7 @@ module Homebrew
formula.path.relative_path_from(T.must(formula.tap).path)
when Cask::Cask
cask = formula_or_cask
if cask.sourcefile_path.blank?
if cask.sourcefile_path.blank? || cask.sourcefile_path.extname != ".rb"
return "#{cask.tap.default_remote}/blob/HEAD/#{cask.tap.relative_cask_path(cask.token)}"
end