Class: Homebrew::DevCmd::GenerateManCompletions

Inherits:
AbstractCommand show all
Includes:
SystemCommand::Mixin
Defined in:
dev-cmd/generate-man-completions.rb

Instance Attribute Summary

Attributes inherited from AbstractCommand

#args

Instance Method Summary collapse

Methods included from SystemCommand::Mixin

#system_command, #system_command!

Methods inherited from AbstractCommand

command, command_name, #initialize, parser

Constructor Details

This class inherits a constructor from Homebrew::AbstractCommand

Instance Method Details

#runvoid

This method returns an undefined value.



23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'dev-cmd/generate-man-completions.rb', line 23

def run
  Commands.rebuild_internal_commands_completion_list
  Manpages.regenerate_man_pages(quiet: args.quiet?)
  Completions.update_shell_completions!

  diff = system_command "git", args: [
    "-C", HOMEBREW_REPOSITORY, "diff", "--exit-code", "docs/Manpage.md", "manpages", "completions"
  ]
  if diff.status.success?
    ofail "No changes to manpage or completions."
  else
    puts "Manpage and completions updated."
  end
end