Merge pull request #10061 from reitermarkus/parser-warning

Hide `parser` warning.
This commit is contained in:
Markus Reiter 2020-12-18 21:43:58 +01:00 committed by GitHub
commit a065dbcc9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -144,10 +144,12 @@ module Homebrew
args << "--color" if Tty.color? args << "--color" if Tty.color?
system cache_env, "rubocop", *args system cache_env, RUBY_PATH, ENV["HOMEBREW_RUBY_WARNINGS"], "-S", "rubocop", *args
$CHILD_STATUS.success? $CHILD_STATUS.success?
when :json when :json
result = system_command "rubocop", args: ["--format", "json", *args], env: cache_env result = system_command RUBY_PATH,
args: [ENV["HOMEBREW_RUBY_WARNINGS"], "-S", "rubocop", "--format", "json", *args],
env: cache_env
json = json_result!(result) json = json_result!(result)
json["files"] json["files"]
end end