Fix JSON output handling.

This commit is contained in:
Mike McQuaid 2016-10-01 17:04:44 +01:00
parent 5b31507fda
commit 84c29fcf1f

View File

@ -57,13 +57,13 @@ module Homebrew
args += [HOMEBREW_LIBRARY_PATH]
else
args << "--config" << HOMEBREW_LIBRARY/".rubocop.yml"
args << "--format" << "simple"
args += files
end
case output_type
when :print
args << "--display-cop-names" if ARGV.include? "--display-cop-names"
args << "--format" << "simple" if files
system "rubocop", *args
!$?.success?
when :json