cmd/update-report: check core tap is installed.

Otherwise `CoreTap.instance.linuxbrew_core?` can fail.
This commit is contained in:
Mike McQuaid 2021-10-25 16:52:29 +01:00
parent 2be6ab6dab
commit 25e61f65db
No known key found for this signature in database
GPG Key ID: 3338A31AFDB1D829

View File

@ -43,7 +43,8 @@ module Homebrew
args = update_report_args.parse args = update_report_args.parse
# Run `brew update` (again) if we've got a linuxbrew-core CoreTap # Run `brew update` (again) if we've got a linuxbrew-core CoreTap
if CoreTap.instance.linuxbrew_core? && ENV["HOMEBREW_LINUXBREW_CORE_MIGRATION"].blank? if CoreTap.instance.installed? && CoreTap.instance.linuxbrew_core? &&
ENV["HOMEBREW_LINUXBREW_CORE_MIGRATION"].blank?
ohai_stdout_or_stderr "Re-running `brew update` for linuxbrew-core migration" ohai_stdout_or_stderr "Re-running `brew update` for linuxbrew-core migration"
if ENV["HOMEBREW_CORE_DEFAULT_GIT_REMOTE"] != ENV["HOMEBREW_CORE_GIT_REMOTE"] if ENV["HOMEBREW_CORE_DEFAULT_GIT_REMOTE"] != ENV["HOMEBREW_CORE_GIT_REMOTE"]