From bdfa7a757dbcaddbb1502991b8d2a95530898ce4 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Fri, 18 Dec 2020 19:37:29 +0100 Subject: [PATCH] Hide `parser` warning. --- Library/Homebrew/style.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/style.rb b/Library/Homebrew/style.rb index 21689e5a56..857c556fc5 100644 --- a/Library/Homebrew/style.rb +++ b/Library/Homebrew/style.rb @@ -144,10 +144,12 @@ module Homebrew 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? 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["files"] end