Exception: Migrator::MigratorDifferentTapsError Private
- 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) ⇒ MigratorDifferentTapsError
constructor
private
A new instance of MigratorDifferentTapsError.
Constructor Details
#initialize(formula, oldname, tap) ⇒ MigratorDifferentTapsError
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 a new instance of MigratorDifferentTapsError.
31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'migrator.rb', line 31 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 |