diff options
| author | Markus Reiter | 2017-06-04 12:07:26 +0200 |
|---|---|---|
| committer | GitHub | 2017-06-04 12:07:26 +0200 |
| commit | 0d124f7510457e3f60d9a6148b0e214118d34726 (patch) | |
| tree | 2c8daec458cd21109d0ad9a6f4a7e59b1a63e8f1 /Library/Homebrew/cmd | |
| parent | 515411707a7617f9ead9e01d5f71e82423af69df (diff) | |
| parent | 3064b5b3c301897f8229ccc4f3b5922bcae64ddf (diff) | |
| download | brew-0d124f7510457e3f60d9a6148b0e214118d34726.tar.bz2 | |
Merge pull request #2718 from reitermarkus/rubocop-audit
Fix `rubocop` in `brew audit`.
Diffstat (limited to 'Library/Homebrew/cmd')
| -rw-r--r-- | Library/Homebrew/cmd/style.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/style.rb b/Library/Homebrew/cmd/style.rb index e469c47bb..7da71749c 100644 --- a/Library/Homebrew/cmd/style.rb +++ b/Library/Homebrew/cmd/style.rb @@ -120,7 +120,7 @@ module Homebrew # exitstatus can also be nil if RuboCop process crashes, e.g. due to # native extension problems. # JSON needs to be at least 2 characters. - if !status.success? || json.to_s.length < 2 + if !(0..1).cover?(status.exitstatus) || json.to_s.length < 2 raise "Error running `rubocop --format json #{args.join " "}`" end RubocopResults.new(JSON.parse(json)) |
