Merge pull request #5166 from GauthamGoli/man-args-fix
man: Restore args after generating man pages from respective cmd parsers
This commit is contained in:
commit
59a72b0a24
@ -189,6 +189,7 @@ module Homebrew
|
|||||||
def generate_cmd_manpages(glob)
|
def generate_cmd_manpages(glob)
|
||||||
cmd_paths = Pathname.glob(glob).sort
|
cmd_paths = Pathname.glob(glob).sort
|
||||||
man_page_lines = []
|
man_page_lines = []
|
||||||
|
man_args = Homebrew.args
|
||||||
cmd_paths.each do |cmd_path|
|
cmd_paths.each do |cmd_path|
|
||||||
begin
|
begin
|
||||||
cmd_parser = Homebrew.send(cmd_arg_parser(cmd_path))
|
cmd_parser = Homebrew.send(cmd_arg_parser(cmd_path))
|
||||||
@ -197,6 +198,7 @@ module Homebrew
|
|||||||
man_page_lines << path_glob_commands(cmd_path.to_s).first
|
man_page_lines << path_glob_commands(cmd_path.to_s).first
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Homebrew.args = man_args
|
||||||
man_page_lines
|
man_page_lines
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user