install-bundler-gems: change_privilege when necessary.

This ensures that gems are able to be installed when using e.g.
`ruby -I` in their installation scripts.
This commit is contained in:
Mike McQuaid 2024-04-29 17:31:19 +01:00
parent 11348b348e
commit 65f3df92d2
No known key found for this signature in database

View File

@ -32,6 +32,7 @@ module Homebrew
Homebrew.forget_user_gem_groups!
end
Process::UID.change_privilege(Process.euid) if Process.euid != Process.uid
Homebrew.install_bundler_gems!(groups:)
end
end