Stop `build_extensions` when DESTDIR set

Try to fix `make install without root privilege` failures on snapshot CIs.

example: https://github.com/ruby/actions/actions/runs/2315349280
This commit is contained in:
Kazuhiro NISHIYAMA 2022-05-13 08:44:17 +09:00
parent ebaf56c013
commit 2d1032075a
No known key found for this signature in database
GPG Key ID: 262ED8DBB4222F7A
1 changed files with 1 additions and 1 deletions

View File

@ -904,7 +904,7 @@ module RbInstall
RbInstall.no_write(options) {super}
end
if RbConfig::CONFIG["LIBRUBY_RELATIVE"] == "yes" || RbConfig::CONFIG["CROSS_COMPILING"] == "yes"
if RbConfig::CONFIG["LIBRUBY_RELATIVE"] == "yes" || RbConfig::CONFIG["CROSS_COMPILING"] == "yes" || ENV["DESTDIR"]
# TODO: always build extensions in bundled gems by build-ext and
# install the built binaries.
def build_extensions