cmd/{install,reinstall,upgrade}: ensure that gh is installed
This commit is contained in:
parent
51ec743d6f
commit
d2d814414e
@ -4,6 +4,7 @@
|
|||||||
require "date"
|
require "date"
|
||||||
require "json"
|
require "json"
|
||||||
require "utils/popen"
|
require "utils/popen"
|
||||||
|
require "utils/github/api"
|
||||||
require "exceptions"
|
require "exceptions"
|
||||||
require "system_command"
|
require "system_command"
|
||||||
|
|
||||||
|
|||||||
@ -263,6 +263,14 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if Homebrew::Attestation.enabled?
|
||||||
|
if formulae.include?(Formula["gh"])
|
||||||
|
formulae.unshift(T.must(formulae.delete(Formula["gh"])))
|
||||||
|
else
|
||||||
|
Homebrew::Attestation.ensure_gh_installed!
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
# if the user's flags will prevent bottle only-installations when no
|
# if the user's flags will prevent bottle only-installations when no
|
||||||
# developer tools are available, we need to stop them early on
|
# developer tools are available, we need to stop them early on
|
||||||
build_flags = []
|
build_flags = []
|
||||||
|
|||||||
@ -124,6 +124,14 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if Homebrew::Attestation.enabled?
|
||||||
|
if formulae.include?(Formula["gh"])
|
||||||
|
formulae.unshift(T.must(formulae.delete(Formula["gh"])))
|
||||||
|
else
|
||||||
|
Homebrew::Attestation.ensure_gh_installed!
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
Install.perform_preinstall_checks
|
Install.perform_preinstall_checks
|
||||||
|
|
||||||
formulae.each do |formula|
|
formulae.each do |formula|
|
||||||
|
|||||||
@ -134,6 +134,14 @@ module Homebrew
|
|||||||
only_upgrade_formulae = formulae.present? && casks.blank?
|
only_upgrade_formulae = formulae.present? && casks.blank?
|
||||||
only_upgrade_casks = casks.present? && formulae.blank?
|
only_upgrade_casks = casks.present? && formulae.blank?
|
||||||
|
|
||||||
|
if Homebrew::Attestation.enabled?
|
||||||
|
if formulae.include?(Formula["gh"])
|
||||||
|
formulae.unshift(T.must(formulae.delete(Formula["gh"])))
|
||||||
|
else
|
||||||
|
Homebrew::Attestation.ensure_gh_installed!
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
upgrade_outdated_formulae(formulae) unless only_upgrade_casks
|
upgrade_outdated_formulae(formulae) unless only_upgrade_casks
|
||||||
upgrade_outdated_casks(casks) unless only_upgrade_formulae
|
upgrade_outdated_casks(casks) unless only_upgrade_formulae
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user