Merge pull request #8881 from whoiswillma/william/fix-cask-info-github-error

cask/cmd/info.rb: Fix crash when running `brew cask info --github`
This commit is contained in:
Mike McQuaid 2020-10-09 09:51:57 +01:00 committed by GitHub
commit d8e11cd5f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -43,15 +43,15 @@ module Cask
def run
if args.json == "v1"
puts JSON.generate(casks.map(&:to_h))
puts JSON.generate(args.named.to_casks.map(&:to_h))
elsif args.github?
raise CaskUnspecifiedError if args.no_named?
args.named.to_formulae_and_casks.map do |cask|
args.named.to_casks.map do |cask|
exec_browser(github_info(cask))
end
else
casks.each_with_index do |cask, i|
args.named.to_casks.each_with_index do |cask, i|
puts unless i.zero?
odebug "Getting info for Cask #{cask}"
self.class.info(cask)