From 24260e7d82f446976ff63de03cf262eb0df6258b Mon Sep 17 00:00:00 2001 From: William Ma Date: Thu, 8 Oct 2020 20:00:45 -0400 Subject: [PATCH] cask/cmd/info: Fix crash when using --github with a formula --- Library/Homebrew/cask/cmd/info.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/cask/cmd/info.rb b/Library/Homebrew/cask/cmd/info.rb index 250269683a..683057a13f 100644 --- a/Library/Homebrew/cask/cmd/info.rb +++ b/Library/Homebrew/cask/cmd/info.rb @@ -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)