diff options
| author | Markus Reiter | 2016-09-27 16:38:05 +0200 |
|---|---|---|
| committer | Markus Reiter | 2016-10-02 00:24:47 +0200 |
| commit | 9690c94f9dcc78d2a00093e21be412c70776541c (patch) | |
| tree | 098fdf50f791c40734d9c5ef2640629615727286 /Library/Homebrew | |
| parent | c36f42ce953b4610b2ba62a2b860720ae6d59e01 (diff) | |
| download | brew-9690c94f9dcc78d2a00093e21be412c70776541c.tar.bz2 | |
Fix Style/GuardClause style offense.
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/utils.rb | 11 |
1 files changed, 5 insertions, 6 deletions
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) |
