Mike McQuaid 4c8ed77302
Improve homebrew/{core,cask} autotapping.
Don't automatically tap these when running a developer command that's
not using the API.

Fixes #14606
2023-02-14 09:54:24 +00:00

15 lines
441 B
Ruby

# typed: true
# frozen_string_literal: true
class Tap
def self.install_default_cask_tap_if_necessary(force: false)
return false if default_cask_tap.installed?
return false if Homebrew::EnvConfig.install_from_api?
return false if Homebrew::EnvConfig.automatically_set_no_install_from_api?
return false if !force && Tap.untapped_official_taps.include?(default_cask_tap.name)
default_cask_tap.install
true
end
end