diff --git a/Library/Homebrew/cli/named_args.rb b/Library/Homebrew/cli/named_args.rb index d40719838c..8a47787b58 100644 --- a/Library/Homebrew/cli/named_args.rb +++ b/Library/Homebrew/cli/named_args.rb @@ -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) diff --git a/Library/Homebrew/dev-cmd/man.rb b/Library/Homebrew/dev-cmd/man.rb index 4d7f961f92..e34fe3cfcb 100644 --- a/Library/Homebrew/dev-cmd/man.rb +++ b/Library/Homebrew/dev-cmd/man.rb @@ -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