Class: CoreTap
Overview
A specialized Tap class for the core formulae.
Constant Summary
Constants inherited from Tap
Tap::HOMEBREW_TAP_AUDIT_EXCEPTIONS_DIR, Tap::HOMEBREW_TAP_FORMULA_RENAMES_FILE, Tap::HOMEBREW_TAP_JSON_FILES, Tap::HOMEBREW_TAP_MIGRATIONS_FILE, Tap::HOMEBREW_TAP_PYPI_FORMULA_MAPPINGS, Tap::HOMEBREW_TAP_STYLE_EXCEPTIONS_DIR, Tap::TAP_DIRECTORY
Instance Attribute Summary
Attributes inherited from Tap
#full_name, #name, #path, #repo, #user
Class Method Summary collapse
Instance Method Summary collapse
-
#install(quiet: false, clone_target: nil, force_auto_update: nil, custom_remote: false, verify: false) ⇒ Object
CoreTap never allows shallow clones (on request from GitHub).
-
#remote ⇒ Object
Methods inherited from Tap
#==, #audit_exception, #cask_dir, #cask_files, #cask_tokens, #clear_cache, cmd_directories, #command_dir, #command_files, #config, #contents, #custom_remote?, default_cask_tap, #default_remote, each, fetch, #fix_remote_configuration, #formula_files, from_path, #git?, #git_branch, #git_head, #git_last_commit, install_default_cask_tap_if_necessary, #installed?, #issues_url, #link_completions_and_manpages, names, #official?, #potential_formula_dirs, #private?, #remote_repo, #repo_var, #shallow?, #to_hash, #to_s, untapped_official_taps, #versioned_formula_files
Methods included from Cachable
Class Method Details
.ensure_installed! ⇒ Object
796 797 798 799 800 801 802 803 804 |
# File 'tap.rb', line 796 def self.ensure_installed! return if instance.installed? return if Homebrew::EnvConfig.install_from_api? # Tests override homebrew-core locations and we don't want to auto-tap in them. return if ENV["HOMEBREW_TESTS"] safe_system HOMEBREW_BREW_FILE, "tap", instance.name end |
.instance ⇒ Object
792 793 794 |
# File 'tap.rb', line 792 def self.instance @instance ||= new end |
Instance Method Details
#install(quiet: false, clone_target: nil, force_auto_update: nil, custom_remote: false, verify: false) ⇒ Object
CoreTap never allows shallow clones (on request from GitHub).
813 814 815 816 817 818 819 820 821 822 823 824 825 |
# File 'tap.rb', line 813 def install(quiet: false, clone_target: nil, force_auto_update: nil, custom_remote: false, verify: false) remote = Homebrew::EnvConfig.core_git_remote # set by HOMEBREW_CORE_GIT_REMOTE requested_remote = clone_target || remote # The remote will changed again on `brew update` since remotes for Homebrew/core are mismatched raise TapCoreRemoteMismatchError.new(name, remote, requested_remote) if requested_remote != remote if remote != default_remote $stderr.puts "HOMEBREW_CORE_GIT_REMOTE set: using #{remote} for Homebrew/core Git remote." end super(quiet: quiet, clone_target: remote, force_auto_update: force_auto_update, custom_remote: custom_remote) end |
#remote ⇒ Object
806 807 808 809 810 |
# File 'tap.rb', line 806 def remote super if installed? || !Homebrew::EnvConfig.install_from_api? Homebrew::EnvConfig.core_git_remote end |