Spec-Zone.ru › Homebrew

Exception: Migrator::MigratorDifferentTapsError Private

Inherits:
RuntimeError
  • Object
  • RuntimeError
  • Migrator::MigratorDifferentTapsError
show all
Defined in:
migrator.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 for when a formula is migrated to a different tap without explicitly using its fully-qualified name.

Instance Method Summary collapse

  • #initialize(formula, oldname, tap) ⇒ void constructor private

Constructor Details

#initialize(formula, oldname, tap) ⇒ 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:

  • formula (Formula)
  • oldname (String)
  • tap (Tap, nil)


38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'migrator.rb', line 38

def initialize(formula, oldname, tap)
  msg = if tap&.core_tap?
    "Please try to use #{oldname} to refer to the formula.\n"
  elsif tap
    "Please try to use fully-qualified #{tap}/#{oldname} to refer to the formula.\n"
  end

  super <<~EOS
#{formula.name} from #{formula.tap} is given, but old name #{oldname} was installed from #{tap || "path or url"}.
#{msg}To force migration, run:
      brew migrate --force #{oldname}  EOS
end

© 2009–present Homebrew contributors
Licensed under the BSD 2-Clause License.
https://docs.brew.sh/rubydoc/Migrator/MigratorDifferentTapsError.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API