Merge pull request #14159 from Bo98/env-shebang

utils/gems: use env shebang when installing gems
This commit is contained in:
Bo Anderson 2022-11-19 01:27:47 +00:00 committed by GitHub
commit 759ab2d0bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -81,7 +81,8 @@ module Homebrew
ohai_if_defined "Installing '#{name}' gem"
# `document: []` is equivalent to --no-document
# `build_args: []` stops ARGV being used as a default
specs = Gem.install name, version, document: [], build_args: []
# `env_shebang: true` makes shebangs generic to allow switching between system and Portable Ruby
specs = Gem.install name, version, document: [], build_args: [], env_shebang: true
end
specs += specs.flat_map(&:runtime_dependencies)