Exception: Migrator::MigratorDifferentTapsError

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

Instance Method Summary collapse

Constructor Details

#initialize(formula, tap) ⇒ MigratorDifferentTapsError



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

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

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