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) ⇒ Object
CoreTap never allows shallow clones (on request from GitHub).
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, #formula_names, 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, #remote_repo, #repo_var, #shallow?, #to_hash, #to_s, untapped_official_taps
Methods included from Cachable
Class Method Details
.ensure_installed! ⇒ Object
791 792 793 794 795 796 |
# File 'tap.rb', line 791 def self.ensure_installed! return if instance.installed? return if Homebrew::EnvConfig.install_from_api? safe_system HOMEBREW_BREW_FILE, "tap", instance.name end |
.instance ⇒ Object
787 788 789 |
# File 'tap.rb', line 787 def self.instance @instance ||= new end |
Instance Method Details
#install(quiet: false, clone_target: nil, force_auto_update: nil, custom_remote: false) ⇒ Object
CoreTap never allows shallow clones (on request from GitHub).
799 800 801 802 803 804 805 806 807 808 809 810 811 |
# File 'tap.rb', line 799 def install(quiet: false, clone_target: nil, force_auto_update: nil, custom_remote: 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 |