brew/Library/Homebrew/cmd/tap-pin.rb

17 lines
377 B
Ruby
Raw Normal View History

2016-04-08 16:28:43 +02:00
#: * `tap-pin` <tap>:
#: Pin <tap>, prioritizing its formulae over core when formula names are supplied
#: by the user. See also `tap-unpin`.
2015-08-09 22:42:46 +08:00
module Homebrew
2016-09-26 01:44:51 +02:00
module_function
2015-08-09 22:42:46 +08:00
def tap_pin
2015-08-25 17:13:37 +02:00
ARGV.named.each do |name|
tap = Tap.fetch(name)
raise "pinning #{tap} is not allowed" if tap.core_tap?
2015-08-09 22:42:46 +08:00
tap.pin
ohai "Pinned #{tap}"
2015-08-09 22:42:46 +08:00
end
end
end