Replaced 'unless nil' with 'if'
This commit is contained in:
parent
9eadee9408
commit
e9b17b8593
@ -31,13 +31,13 @@ module Cask
|
||||
output << Formatter.url(cask.homepage) + "\n" if cask.homepage
|
||||
output << installation_info(cask)
|
||||
repo = repo_info(cask)
|
||||
output << repo + "\n" unless repo.nil?
|
||||
output << repo + "\n" if repo
|
||||
output << name_info(cask)
|
||||
language = language_info(cask)
|
||||
output << language unless language.nil?
|
||||
output << language if language
|
||||
output << artifact_info(cask) + "\n"
|
||||
caveats = Installer.caveats(cask)
|
||||
output << caveats unless caveats.nil?
|
||||
output << caveats if caveats
|
||||
output
|
||||
end
|
||||
|
||||
|
@ -195,7 +195,7 @@ module Homebrew
|
||||
|
||||
cask = Cask::CaskLoader.load(name)
|
||||
reason = "Found the following cask named \"#{name}\" instead:\n"
|
||||
reason << Cask::Cmd::Info.get_info(cask) unless silent
|
||||
reason << Cask::Cmd::Info.get_info(cask)
|
||||
rescue Cask::CaskUnavailableError
|
||||
nil
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user