From 9690c94f9dcc78d2a00093e21be412c70776541c Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Tue, 27 Sep 2016 16:38:05 +0200 Subject: Fix Style/GuardClause style offense. --- Library/Homebrew/utils.rb | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'Library/Homebrew') diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index 634da7394..7c68437ca 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -293,12 +293,11 @@ module Homebrew odie "Failed to install/update the '#{name}' gem." if exit_code.nonzero? end - unless which executable - odie <<-EOS.undent - The '#{name}' gem is installed but couldn't find '#{executable}' in the PATH: - #{ENV["PATH"]} - EOS - end + return if which(executable) + odie <<-EOS.undent + The '#{name}' gem is installed but couldn't find '#{executable}' in the PATH: + #{ENV["PATH"]} + EOS end # Hash of Module => Set(method_names) -- cgit v1.2.3