From e9b17b859398111db8530d64952e54b6c8e6cb72 Mon Sep 17 00:00:00 2001 From: Zach Auten Date: Sat, 16 Mar 2019 12:59:15 -0400 Subject: [PATCH] Replaced 'unless nil' with 'if' --- Library/Homebrew/cask/cmd/info.rb | 6 +++--- Library/Homebrew/missing_formula.rb | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Library/Homebrew/cask/cmd/info.rb b/Library/Homebrew/cask/cmd/info.rb index 9f855b595b..29b5c541b6 100644 --- a/Library/Homebrew/cask/cmd/info.rb +++ b/Library/Homebrew/cask/cmd/info.rb @@ -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 diff --git a/Library/Homebrew/missing_formula.rb b/Library/Homebrew/missing_formula.rb index 82a8c7ec70..b5af36b02d 100644 --- a/Library/Homebrew/missing_formula.rb +++ b/Library/Homebrew/missing_formula.rb @@ -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