Fix Style/GuardClause style offense.

This commit is contained in:
Markus Reiter 2016-09-27 16:38:05 +02:00
parent c36f42ce95
commit 9690c94f9d

View File

@ -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)