fix: clang variable for native module installs from build dir (#242601)

This commit is contained in:
Robo 2025-03-05 05:19:05 +09:00 committed by GitHub
parent 2c076f5582
commit 7933f52914
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View File

@ -2,4 +2,5 @@ disturl="https://nodejs.org/dist"
runtime="node"
build_from_source="true"
legacy-peer-deps="true"
force_process_config="true"
timeout=180000

View File

@ -85,7 +85,7 @@ function setNpmrcConfig(dir, env) {
// the correct clang variable. So keep the version check
// in preinstall sync with this logic.
// Change was first introduced in https://github.com/nodejs/node/commit/6e0a2bb54c5bbeff0e9e33e1a0c683ed980a8a0f
if (dir === 'remote' && process.platform === 'darwin') {
if ((dir === 'remote' || dir === 'build') && process.platform === 'darwin') {
env['npm_config_force_process_config'] = 'true';
} else {
delete env['npm_config_force_process_config'];