Improve brew man output.
This commit is contained in:
parent
f54b458cda
commit
d443afc82d
@ -21,7 +21,7 @@ module Homebrew
|
||||
end
|
||||
|
||||
def to_formulae
|
||||
@to_formulae ||= to_formulae_and_casks.select { |o| o.is_a?(Formula) }.freeze
|
||||
@to_formulae ||= to_formulae_and_casks(only: :formula).freeze
|
||||
end
|
||||
|
||||
def to_formulae_and_casks(only: nil)
|
||||
|
||||
@ -38,9 +38,14 @@ module Homebrew
|
||||
Commands.rebuild_internal_commands_completion_list
|
||||
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"
|
||||
diff = system_command "git", args: [
|
||||
"-C", HOMEBREW_REPOSITORY, "diff", "--exit-code", "docs/Manpage.md", "manpages", "completions"
|
||||
]
|
||||
if diff.status.success?
|
||||
puts "No changes to manpage or completions output detected."
|
||||
elsif args.fail_if_changed?
|
||||
puts "Changes to manpage or completions detected:"
|
||||
puts diff.stdout
|
||||
Homebrew.failed = true
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user