Exception: Migrator::MigratorDifferentTapsError

Inherits:
RuntimeError
  • Object
show all
Defined in:
brew/Library/Homebrew/migrator.rb

Instance Method Summary collapse

Constructor Details

#initialize(formula, tap) ⇒ MigratorDifferentTapsError

Returns a new instance of MigratorDifferentTapsError



30
31
32
33
34
35
36
37
38
39
40
41
# File 'brew/Library/Homebrew/migrator.rb', line 30

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

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