Skip to content
Snippets Groups Projects
Commit d443afc8 authored by Markus Reiter's avatar Markus Reiter
Browse files

Improve `brew man` output.

parent f54b458c
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
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