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
|
FileUtils.rm_rf cache_env["XDG_CACHE_HOME"] if reset_cache
|
||||||
|
|
||||||
|
ruby_args = HOMEBREW_RUBY_EXEC_ARGS.dup
|
||||||
case output_type
|
case output_type
|
||||||
when :print
|
when :print
|
||||||
args << "--debug" if debug
|
args << "--debug" if debug
|
||||||
@ -153,11 +154,11 @@ module Homebrew
|
|||||||
|
|
||||||
args << "--color" if Tty.color?
|
args << "--color" if Tty.color?
|
||||||
|
|
||||||
system cache_env, RUBY_PATH, RUBOCOP, *args
|
system cache_env, *ruby_args, "--", RUBOCOP, *args
|
||||||
$CHILD_STATUS.success?
|
$CHILD_STATUS.success?
|
||||||
when :json
|
when :json
|
||||||
result = system_command RUBY_PATH,
|
result = system_command ruby_args.shift,
|
||||||
args: [RUBOCOP, "--format", "json", *args],
|
args: [*ruby_args, "--", RUBOCOP, "--format", "json", *args],
|
||||||
env: cache_env
|
env: cache_env
|
||||||
json = json_result!(result)
|
json = json_result!(result)
|
||||||
json["files"]
|
json["files"]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user