Fix brew style.

This commit is contained in:
Mike McQuaid 2021-03-01 13:43:47 +00:00
parent 03e761079c
commit 9663567501
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70
4 changed files with 5 additions and 5 deletions

View File

@ -165,7 +165,7 @@ module Cask
odebug "Auditing stanzas which require an uninstall"
return if cask.artifacts.none? { |k| k.is_a?(Artifact::Pkg) || k.is_a?(Artifact::Installer) }
return if cask.artifacts.any? { |k| k.is_a?(Artifact::Uninstall) }
return if cask.artifacts.any?(Artifact::Uninstall)
add_error "installer and pkg stanzas require an uninstall stanza"
end

View File

@ -474,7 +474,7 @@ module Homebrew
"<#{type}>"
end.compact
types << "<subcommand>" if @named_args_type.any? { |type| type.is_a? String }
types << "<subcommand>" if @named_args_type.any?(String)
types.join("|")
elsif SYMBOL_TO_USAGE_MAPPING.key? @named_args_type
SYMBOL_TO_USAGE_MAPPING[@named_args_type]

View File

@ -166,11 +166,11 @@ module Homebrew
requirements = f.recursive_requirements
if @bottle_tag.to_s.end_with?("_linux")
if requirements.any? { |r| r.is_a?(MacOSRequirement) }
if requirements.any?(MacOSRequirement)
puts "#{Tty.bold}#{Tty.red}#{name}#{Tty.reset}: requires macOS" if any_named_args
next
end
elsif requirements.any? { |r| r.is_a?(LinuxRequirement) }
elsif requirements.any?(LinuxRequirement)
puts "#{Tty.bold}#{Tty.red}#{name}#{Tty.reset}: requires Linux" if any_named_args
next
else

View File

@ -1049,7 +1049,7 @@ class CVSDownloadStrategy < VCSDownloadStrategy
end
def split_url(in_url)
parts = in_url.split(/:/)
parts = in_url.split(":")
mod = parts.pop
url = parts.join(":")
[mod, url]