Fix rubocop in brew audit.
This commit is contained in:
parent
98959f1fb9
commit
7c0a3a1233
@ -120,7 +120,7 @@ module Homebrew
|
|||||||
# exitstatus can also be nil if RuboCop process crashes, e.g. due to
|
# exitstatus can also be nil if RuboCop process crashes, e.g. due to
|
||||||
# native extension problems.
|
# native extension problems.
|
||||||
# JSON needs to be at least 2 characters.
|
# 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 " "}`"
|
raise "Error running `rubocop --format json #{args.join " "}`"
|
||||||
end
|
end
|
||||||
RubocopResults.new(JSON.parse(json))
|
RubocopResults.new(JSON.parse(json))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user