cmd/info: handle casks with API.

Fall back to default location.
This commit is contained in:
Mike McQuaid 2023-02-24 15:44:53 +00:00
parent 041545db2c
commit 4ef8632687
No known key found for this signature in database
GPG Key ID: 3338A31AFDB1D829

View File

@ -254,6 +254,8 @@ module Homebrew
when Formula
f.path.relative_path_from(f.tap.path)
when Cask::Cask
return "#{f.tap.default_remote}/blob/HEAD/Casks/#{f.token}.rb" if f.sourcefile_path.blank?
f.sourcefile_path.relative_path_from(f.tap.path)
end
github_remote_path(f.tap.remote, path)