match .gz man page files

Emacs cask has compressed man pages and they should be supported.
This commit is contained in:
xxyzz 2021-04-06 11:19:05 +08:00
parent 6e7857cc4e
commit 06d655bf50
No known key found for this signature in database
GPG Key ID: F796163E6DCFEE9D

View File

@ -12,7 +12,7 @@ module Cask
attr_reader :section
def self.from_args(cask, source)
section = source.to_s[/\.([1-8]|n|l)$/, 1]
section = source.to_s[/\.([1-8]|n|l)(?:\.gz)?$/, 1]
raise CaskInvalidError, "'#{source}' is not a valid man page name" unless section