nodejs / gyp-next

A fork of the GYP build system for use in the Node.js projects
BSD 3-Clause "New" or "Revised" License
125 stars 69 forks source link

fix: failed to detect flavor if compiler path include white spaces #240

Closed toyobayashi closed 2 months ago

toyobayashi commented 3 months ago

This PR is a follow-up optimization to #222.

In previous implementation of GetCrossCompilerPredefines, if CC_target include white space

"/Users/Toyo Li/wasi-sdk/bin/clang"

the cmd passed to subprocess.Popen is incorrect:

['"/Users/Toyo', 'Li/wasi-sdk/bin/clang"', ...]

This PR fixed this issue, and will raise error if process exit code is not 0.

toyobayashi commented 3 months ago

This two windows CI failed with different errors, seems have nothing to do with changes in this PR.

https://github.com/nodejs/gyp-next/actions/runs/8523184021/job/23344932415 https://github.com/nodejs/gyp-next/actions/runs/8523270071/job/23345184290