Use RUBY_PATH and HOMEBREW_RUBY_EXEC_ARGS more universally
This commit is contained in:
parent
fae972c9d7
commit
0a1762bd14
@ -32,7 +32,7 @@ module Homebrew
|
|||||||
if args.stackprof?
|
if args.stackprof?
|
||||||
Homebrew.install_gem_setup_path! "stackprof"
|
Homebrew.install_gem_setup_path! "stackprof"
|
||||||
with_env HOMEBREW_STACKPROF: "1" do
|
with_env HOMEBREW_STACKPROF: "1" do
|
||||||
system ENV["HOMEBREW_RUBY_PATH"], brew_rb, *args.named
|
system RUBY_PATH, brew_rb, *args.named
|
||||||
end
|
end
|
||||||
output_filename = "prof/d3-flamegraph.html"
|
output_filename = "prof/d3-flamegraph.html"
|
||||||
safe_system "stackprof --d3-flamegraph prof/stackprof.dump > #{output_filename}"
|
safe_system "stackprof --d3-flamegraph prof/stackprof.dump > #{output_filename}"
|
||||||
|
|||||||
@ -33,10 +33,9 @@ module Homebrew
|
|||||||
ruby_sys_args << "-e #{args.e}" if args.e
|
ruby_sys_args << "-e #{args.e}" if args.e
|
||||||
ruby_sys_args += args.named
|
ruby_sys_args += args.named
|
||||||
|
|
||||||
exec RUBY_PATH,
|
exec(*HOMEBREW_RUBY_EXEC_ARGS,
|
||||||
ENV["HOMEBREW_RUBY_WARNINGS"],
|
|
||||||
"-I", $LOAD_PATH.join(File::PATH_SEPARATOR),
|
"-I", $LOAD_PATH.join(File::PATH_SEPARATOR),
|
||||||
"-rglobal", "-rdev-cmd/irb",
|
"-rglobal", "-rdev-cmd/irb",
|
||||||
*ruby_sys_args
|
*ruby_sys_args)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -1084,12 +1084,12 @@ class FormulaInstaller
|
|||||||
|
|
||||||
sig { void }
|
sig { void }
|
||||||
def post_install
|
def post_install
|
||||||
args = %W[
|
args = [
|
||||||
nice #{RUBY_PATH}
|
"nice",
|
||||||
#{ENV["HOMEBREW_RUBY_WARNINGS"]}
|
*HOMEBREW_RUBY_EXEC_ARGS,
|
||||||
-I #{$LOAD_PATH.join(File::PATH_SEPARATOR)}
|
"-I", $LOAD_PATH.join(File::PATH_SEPARATOR),
|
||||||
--
|
"--",
|
||||||
#{HOMEBREW_LIBRARY_PATH}/postinstall.rb
|
HOMEBREW_LIBRARY_PATH/"postinstall.rb"
|
||||||
]
|
]
|
||||||
|
|
||||||
# Use the formula from the keg if:
|
# Use the formula from the keg if:
|
||||||
|
|||||||
@ -5,7 +5,7 @@ homebrew_bootsnap_enabled = !ENV["HOMEBREW_NO_BOOTSNAP"] && ENV["HOMEBREW_BOOTSN
|
|||||||
|
|
||||||
# portable ruby doesn't play nice with bootsnap
|
# portable ruby doesn't play nice with bootsnap
|
||||||
# Can't use .exclude? here because we haven't required active_support yet.
|
# Can't use .exclude? here because we haven't required active_support yet.
|
||||||
homebrew_bootsnap_enabled &&= !ENV["HOMEBREW_RUBY_PATH"].to_s.include?("/vendor/portable-ruby/") # rubocop:disable Rails/NegateInclude
|
homebrew_bootsnap_enabled &&= !RUBY_PATH.to_s.include?("/vendor/portable-ruby/") # rubocop:disable Rails/NegateInclude
|
||||||
|
|
||||||
homebrew_bootsnap_enabled &&= if ENV["HOMEBREW_MACOS_VERSION"]
|
homebrew_bootsnap_enabled &&= if ENV["HOMEBREW_MACOS_VERSION"]
|
||||||
# Apple Silicon doesn't play nice with bootsnap
|
# Apple Silicon doesn't play nice with bootsnap
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user