brew/Library/Homebrew/cmd/switch.rb

33 lines
574 B
Ruby
Raw Normal View History

2020-11-25 17:03:23 +01:00
# typed: true
# frozen_string_literal: true
require "formula"
require "keg"
2019-04-17 18:25:08 +09:00
require "cli/parser"
2014-09-20 14:31:44 +01:00
module Homebrew
2020-10-20 12:03:48 +02:00
extend T::Sig
2016-09-26 01:44:51 +02:00
module_function
2020-10-20 12:03:48 +02:00
sig { returns(CLI::Parser) }
2019-01-18 22:03:30 +05:30
def switch_args
Homebrew::CLI::Parser.new do
usage_banner <<~EOS
`switch` <formula> <version>
2019-08-06 14:22:24 -04:00
Symlink all of the specified <version> of <formula>'s installation into Homebrew's prefix.
2019-01-18 22:03:30 +05:30
EOS
2020-07-30 18:40:10 +02:00
named 2
hide_from_man_page!
2019-01-18 22:03:30 +05:30
end
end
2014-09-20 14:31:44 +01:00
def switch
switch_args.parse
odisabled "`brew switch`", "`brew link` @-versioned formulae"
2014-09-20 14:31:44 +01:00
end
end