Exception: Cask::TapCaskAmbiguityError Private

Inherits:
CaskError show all
Defined in:
cask/exceptions.rb

Overview

This class is part of a private API. This class may only be used in the Homebrew/brew repository. Third parties should avoid using this class if possible, as it may be removed or changed without warning.

Error when a cask with the same name is found in multiple taps.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(token, loaders) ⇒ void

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

Parameters:



121
122
123
124
125
126
127
128
129
130
131
132
133
# File 'cask/exceptions.rb', line 121

def initialize(token, loaders)
  @loaders = loaders

  taps = loaders.map(&:tap)
  casks = taps.map { |tap| "#{tap}/#{token}" }
  cask_list = casks.sort.map { |f| "\n       * #{f}" }.join

  super <<~EOS
    Cask #{token} exists in multiple taps:#{cask_list}

    Please use the fully-qualified name (e.g. #{casks.first}) to refer to a specific Cask.
  EOS
end

Instance Attribute Details

#loadersArray<CaskLoader::FromNameLoader> (readonly)

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.



118
119
120
# File 'cask/exceptions.rb', line 118

def loaders
  @loaders
end

#tokenString (readonly)

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

Returns:



115
116
117
# File 'cask/exceptions.rb', line 115

def token
  @token
end