Module: Homebrew::Bundle::TapInstaller Private
- Defined in:
- bundle/tap_installer.rb
This module is part of a private API. This module may only be used in the Homebrew/brew repository. Third parties should avoid using this module if possible, as it may be removed or changed without warning.
Class Method Summary collapse
- .install(name, preinstall: true, verbose: false, force: false, **options) ⇒ Object private
- .installed_taps ⇒ Object private
- .preinstall(name, verbose: false, **_options) ⇒ Object private
Class Method Details
.install(name, preinstall: true, verbose: false, force: false, **options) ⇒ Object
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.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'bundle/tap_installer.rb', line 16 def self.install(name, preinstall: true, verbose: false, force: false, **) return true unless preinstall puts "Installing #{name} tap. It is not currently installed." if verbose args = [] args << "--force" if force args.append("--force-auto-update") if [:force_auto_update] success = if [:clone_target] Bundle.brew("tap", name, [:clone_target], *args, verbose:) else Bundle.brew("tap", name, *args, verbose:) end unless success require "bundle/skipper" Homebrew::Bundle::Skipper.tap_failed!(name) return false end installed_taps << name true end |
.installed_taps ⇒ Object
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.
40 41 42 43 |
# File 'bundle/tap_installer.rb', line 40 def self.installed_taps require "bundle/tap_dumper" @installed_taps ||= Homebrew::Bundle::TapDumper.tap_names end |
.preinstall(name, verbose: false, **_options) ⇒ Object
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.
7 8 9 10 11 12 13 14 |
# File 'bundle/tap_installer.rb', line 7 def self.preinstall(name, verbose: false, **) if installed_taps.include? name puts "Skipping install of #{name} tap. It is already installed." if verbose return false end true end |