Class: Homebrew::Cmd::Migrate Private

Inherits:
AbstractCommand show all
Defined in:
cmd/migrate.rb,
sorbet/rbi/dsl/homebrew/cmd/migrate.rbi

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.

Defined Under Namespace

Classes: Args

Instance Method Summary collapse

Methods inherited from AbstractCommand

command, command_name, dev_cmd?, #initialize, parser, #raise_sh_command_error!

Constructor Details

This class inherits a constructor from Homebrew::AbstractCommand

Instance Method Details

#argsHomebrew::Cmd::Migrate::Args

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.



10
# File 'sorbet/rbi/dsl/homebrew/cmd/migrate.rbi', line 10

def args; end

#runvoid

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.

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