diff --git a/Library/Homebrew/cmd/migrate.rb b/Library/Homebrew/cmd/migrate.rb index 951a2942ed..f32e34f87b 100644 --- a/Library/Homebrew/cmd/migrate.rb +++ b/Library/Homebrew/cmd/migrate.rb @@ -6,11 +6,30 @@ #: like if they are from same taps and migrate them anyway. require "migrator" +require "cli_parser" module Homebrew module_function + def migrate_args + Homebrew::CLI::Parser.new do + usage_banner <<~EOS + `migrate` [] + + Migrate renamed packages to new name, where are old names of + packages. + EOS + switch :force, + description: "Treat installed and passed like if they are from "\ + "same taps and migrate them anyway." + switch :verbose + switch :debug + end + end + def migrate + migrate_args.parse + raise FormulaUnspecifiedError if ARGV.named.empty? ARGV.resolved_formulae.each do |f|