diff options
| author | Mike McQuaid | 2015-08-14 14:50:26 +0100 | 
|---|---|---|
| committer | Mike McQuaid | 2015-08-14 15:18:45 +0100 | 
| commit | 49dce3e7ae6923f00f603852287a435e7b21ddcb (patch) | |
| tree | 7d12d7781db8127ee3c7580ac78be11e231d2a0c /Library/Homebrew/migrator.rb | |
| parent | 3d7c38c7361ce98eb137af589bb6cfec4e2950e9 (diff) | |
| download | brew-49dce3e7ae6923f00f603852287a435e7b21ddcb.tar.bz2 | |
outdated: check if formula needs to be migrated.
Closes Homebrew/homebrew#42938.
Diffstat (limited to 'Library/Homebrew/migrator.rb')
| -rw-r--r-- | Library/Homebrew/migrator.rb | 9 | 
1 files changed, 9 insertions, 0 deletions
diff --git a/Library/Homebrew/migrator.rb b/Library/Homebrew/migrator.rb index 0ad02ab01..fb01cf7f3 100644 --- a/Library/Homebrew/migrator.rb +++ b/Library/Homebrew/migrator.rb @@ -4,6 +4,15 @@ require "tab"  require "tap_migrations"  class Migrator +  class MigrationNeededError < RuntimeError +    def initialize(formula) +      super <<-EOS.undent +        #{formula.oldname} was renamed to #{formula.name} and needs to be migrated. +        Please run `brew migrate #{formula.oldname}` +      EOS +    end +  end +    class MigratorNoOldnameError < RuntimeError      def initialize(formula)        super "#{formula.name} doesn't replace any formula."  | 
