Class: Homebrew::Cmd::Migrate

Inherits:
AbstractCommand show all
Defined in:
cmd/migrate.rb

Instance Attribute Summary

Attributes inherited from AbstractCommand

#args

Instance Method Summary collapse

Methods inherited from AbstractCommand

command, command_name, #initialize, parser

Constructor Details

This class inherits a constructor from Homebrew::AbstractCommand

Instance Method Details

#runvoid

This method returns an undefined value.



32
33
34
35
36
37
38
39
40
41
# File 'cmd/migrate.rb', line 32

def run
  args.named.to_formulae_and_casks(warn: false).each do |formula_or_cask|
    case formula_or_cask
    when Formula
      Migrator.migrate_if_needed(formula_or_cask, force: args.force?, dry_run: args.dry_run?)
    when Cask::Cask
      Cask::Migrator.migrate_if_needed(formula_or_cask, dry_run: args.dry_run?)
    end
  end
end