diff options
| author | Markus Reiter | 2016-09-24 17:38:49 +0200 |
|---|---|---|
| committer | GitHub | 2016-09-24 17:38:49 +0200 |
| commit | e2c7509065d8cd6fd76cd631f5c8d1068df49cad (patch) | |
| tree | 03eee4f10d15a33674735be36d0939da964ab60c /Library/Homebrew/utils | |
| parent | eb3b94d94a7329d92171b75ea163f139cbf71aa6 (diff) | |
| parent | 58e36c73193befb57d351344cea2a4a33fef850d (diff) | |
| download | brew-e2c7509065d8cd6fd76cd631f5c8d1068df49cad.tar.bz2 | |
Merge pull request #1113 from reitermarkus/rubocop-guardclause
RuboCop: Fix Style/GuardClause.
Diffstat (limited to 'Library/Homebrew/utils')
| -rw-r--r-- | Library/Homebrew/utils/popen.rb | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Library/Homebrew/utils/popen.rb b/Library/Homebrew/utils/popen.rb index 76e67b3a9..350d9a09f 100644 --- a/Library/Homebrew/utils/popen.rb +++ b/Library/Homebrew/utils/popen.rb @@ -14,11 +14,8 @@ module Utils def self.popen(args, mode) IO.popen("-", mode) do |pipe| if pipe - if block_given? - yield pipe - else - return pipe.read - end + return pipe.read unless block_given? + yield pipe else $stderr.reopen("/dev/null", "w") exec(*args) |
