File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
packages/node-smol-builder/scripts Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -1452,11 +1452,20 @@ async function main() {
14521452 // propagate environment variables to subprocesses.
14531453 const execOptions = {
14541454 cwd : NODE_DIR ,
1455- env : process . env ,
1455+ env : WIN32
1456+ ? {
1457+ ...process . env ,
1458+ // Tell gyp to use VS 2022, bypassing auto-detection.
1459+ // https://github.com/nodejs/node/blob/main/BUILDING.md#windows
1460+ // https://github.com/nodejs/node/blob/main/tools/gyp/pylib/gyp/MSVSVersion.py
1461+ GYP_MSVS_VERSION : '2022' ,
1462+ }
1463+ : process . env ,
14561464 shell : false ,
14571465 }
14581466 if ( WIN32 ) {
1459- logger . log ( `DEBUG: Passing env with ${ Object . keys ( process . env ) . length } variables (shell: false)` )
1467+ logger . log ( `DEBUG: Passing env with ${ Object . keys ( execOptions . env ) . length } variables (shell: false)` )
1468+ logger . log ( `DEBUG: GYP_MSVS_VERSION = ${ execOptions . env . GYP_MSVS_VERSION } ` )
14601469 }
14611470
14621471 await exec ( configureCommand , configureArgs , execOptions )
You can’t perform that action at this time.
0 commit comments