Merge pull request #12003 from hyuraku/brew-list-shows-cask-without-option
brew list shows cask without option
This commit is contained in:
		
						commit
						8db3289f15
					
				@ -77,7 +77,7 @@ module Homebrew
 | 
			
		||||
      def to_formulae_to_casks(only: parent&.only_formula_or_cask, method: nil)
 | 
			
		||||
        @to_formulae_to_casks ||= {}
 | 
			
		||||
        @to_formulae_to_casks[[method, only]] = to_formulae_and_casks(only: only, method: method)
 | 
			
		||||
                                                .partition { |o| o.is_a?(Formula) }
 | 
			
		||||
                                                .partition { |o| o.is_a?(Formula) || o.is_a?(Keg) }
 | 
			
		||||
                                                .map(&:freeze).freeze
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -104,7 +104,7 @@ module Homebrew
 | 
			
		||||
        puts full_cask_names if full_cask_names.present?
 | 
			
		||||
      end
 | 
			
		||||
    elsif args.cask?
 | 
			
		||||
      list_casks(args: args)
 | 
			
		||||
      list_casks(args.named.to_casks, args: args)
 | 
			
		||||
    elsif args.pinned? || args.versions?
 | 
			
		||||
      filtered_list args: args
 | 
			
		||||
    elsif args.no_named?
 | 
			
		||||
@ -132,7 +132,10 @@ module Homebrew
 | 
			
		||||
      system_command! "find", args:         args.named.to_default_kegs.map(&:to_s) + %w[-not -type d -print],
 | 
			
		||||
                              print_stdout: true
 | 
			
		||||
    else
 | 
			
		||||
      args.named.to_default_kegs.each { |keg| PrettyListing.new keg }
 | 
			
		||||
      kegs, casks = args.named.to_formulae_to_casks(method: :default_kegs)
 | 
			
		||||
 | 
			
		||||
      kegs.each { |keg| PrettyListing.new keg } if kegs.present?
 | 
			
		||||
      list_casks(casks, args: args) if casks.present?
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
@ -165,9 +168,9 @@ module Homebrew
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  def list_casks(args:)
 | 
			
		||||
  def list_casks(casks, args:)
 | 
			
		||||
    Cask::Cmd::List.list_casks(
 | 
			
		||||
      *args.named.to_casks,
 | 
			
		||||
      *casks,
 | 
			
		||||
      one:       args.public_send(:"1?"),
 | 
			
		||||
      full_name: args.full_name?,
 | 
			
		||||
      versions:  args.versions?,
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user