style: use HOMEBREW_RUBY_EXEC_ARGS
This commit is contained in:
parent
8036b70ead
commit
e03548fc7a
@ -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"]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user