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) ⇒ 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.
37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'migrator.rb', line 37 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 |