Skip to content
Snippets Groups Projects
Unverified Commit 2cead8e6 authored by Markus Reiter's avatar Markus Reiter Committed by GitHub
Browse files

Merge pull request #8673 from reitermarkus/tap-pass-quiet

Pass `quiet` when tapping external commands.
parents c70d6d1f 540fa4e8
No related branches found
No related tags found
No related merge requests found
......@@ -139,7 +139,8 @@ begin
brew_uid = HOMEBREW_BREW_FILE.stat.uid
tap_commands += %W[/usr/bin/sudo -u ##{brew_uid}] if Process.uid.zero? && !brew_uid.zero?
end
tap_commands += %W[#{HOMEBREW_BREW_FILE} tap #{possible_tap.name}]
quiet_arg = args.quiet? ? "--quiet" : nil
tap_commands += [HOMEBREW_BREW_FILE, "tap", *quiet_arg, possible_tap.name]
safe_system(*tap_commands)
end
......
......@@ -106,10 +106,10 @@ module Commands
find_commands HOMEBREW_DEV_CMD_PATH
end
def official_external_commands_paths
def official_external_commands_paths(quiet:)
%w[bundle services test-bot].map do |cmd|
tap = Tap.fetch("Homebrew/#{cmd}")
tap.install unless tap.installed?
tap.install(quiet: quiet) unless tap.installed?
external_ruby_v2_cmd_path(cmd)
end
end
......
......@@ -36,7 +36,7 @@ module Homebrew
odie "`brew man --link` is now done automatically by `brew update`." if args.link?
Commands.rebuild_internal_commands_completion_list
regenerate_man_pages(preserve_date: args.fail_if_changed?)
regenerate_man_pages(preserve_date: args.fail_if_changed?, quiet: args.quiet?)
if system "git", "-C", HOMEBREW_REPOSITORY, "diff", "--quiet", "docs/Manpage.md", "manpages", "completions"
puts "No changes to manpage or completions output detected."
......@@ -45,21 +45,22 @@ module Homebrew
end
end
def regenerate_man_pages(preserve_date:)
def regenerate_man_pages(preserve_date:, quiet:)
Homebrew.install_bundler_gems!
markup = build_man_page
markup = build_man_page(quiet: quiet)
convert_man_page(markup, TARGET_DOC_PATH/"Manpage.md", preserve_date: preserve_date)
convert_man_page(markup, TARGET_MAN_PATH/"brew.1", preserve_date: preserve_date)
end
def build_man_page
def build_man_page(quiet:)
template = (SOURCE_PATH/"brew.1.md.erb").read
variables = OpenStruct.new
variables[:commands] = generate_cmd_manpages(Commands.internal_commands_paths)
variables[:developer_commands] = generate_cmd_manpages(Commands.internal_developer_commands_paths)
variables[:official_external_commands] = generate_cmd_manpages(Commands.official_external_commands_paths)
variables[:official_external_commands] =
generate_cmd_manpages(Commands.official_external_commands_paths(quiet: quiet))
variables[:global_options] = global_options_manpage
variables[:environment_variables] = env_vars_manpage
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment