From e03548fc7a7ef3774a00e0f34eb0ea6b18b80b00 Mon Sep 17 00:00:00 2001 From: Bo Anderson Date: Sat, 5 Nov 2022 03:05:58 +0000 Subject: [PATCH] style: use HOMEBREW_RUBY_EXEC_ARGS --- Library/Homebrew/style.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/style.rb b/Library/Homebrew/style.rb index cdbabeb93f..e3a7c763b7 100644 --- a/Library/Homebrew/style.rb +++ b/Library/Homebrew/style.rb @@ -143,6 +143,7 @@ module Homebrew FileUtils.rm_rf cache_env["XDG_CACHE_HOME"] if reset_cache + ruby_args = HOMEBREW_RUBY_EXEC_ARGS.dup case output_type when :print args << "--debug" if debug @@ -153,11 +154,11 @@ module Homebrew args << "--color" if Tty.color? - system cache_env, RUBY_PATH, RUBOCOP, *args + system cache_env, *ruby_args, "--", RUBOCOP, *args $CHILD_STATUS.success? when :json - result = system_command RUBY_PATH, - args: [RUBOCOP, "--format", "json", *args], + result = system_command ruby_args.shift, + args: [*ruby_args, "--", RUBOCOP, "--format", "json", *args], env: cache_env json = json_result!(result) json["files"]