man: Restore args after generating man pages from respective cmd parsers

This commit is contained in:
Gautham Goli 2018-10-24 01:17:38 +05:30
parent e3f5450ac3
commit f7013d1738
No known key found for this signature in database
GPG Key ID: 6A9ABBC284468364

View File

@ -189,6 +189,7 @@ module Homebrew
def generate_cmd_manpages(glob)
cmd_paths = Pathname.glob(glob).sort
man_page_lines = []
man_args = Homebrew.args
cmd_paths.each do |cmd_path|
begin
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
end
end
Homebrew.args = man_args
man_page_lines
end