tools: fix return value of try_check_compiler
Some checks failed
Coverage Windows / coverage-windows (push) Waiting to run
Coverage Linux / coverage-linux (push) Failing after 1m7s
Coverage Linux (without intl) / coverage-linux-without-intl (push) Failing after 1m8s
Linters / lint-js-and-md (push) Successful in 10m13s
Linters / lint-addon-docs (push) Successful in 2m27s
Linters / lint-cpp (push) Successful in 3m35s
Linters / format-cpp (push) Has been skipped
Test and upload documentation to artifacts / build-docs (push) Failing after 5m33s
Linters / lint-py (push) Successful in 2m45s
Linters / lint-yaml (push) Successful in 2m10s
Linters / lint-sh (push) Failing after 1m25s
Linters / lint-codeowners (push) Failing after 56s
Linters / lint-pr-url (push) Has been skipped
Linters / lint-readme (push) Successful in 1m25s
Notify on Push / Notify on Force Push on `main` (push) Has been skipped
Notify on Push / Notify on Push on `main` that lacks metadata (push) Has been skipped
Scorecard supply-chain security / Scorecard analysis (push) Failing after 53s

PR-URL: https://github.com/nodejs/node/pull/59434
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
This commit is contained in:
theanarkh 2025-08-13 18:39:53 +08:00 committed by GitHub
parent becb55aac3
commit 6e04511296
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1113,7 +1113,7 @@ def try_check_compiler(cc, lang):
proc = subprocess.Popen(shlex.split(cc) + ['-E', '-P', '-x', lang, '-'], proc = subprocess.Popen(shlex.split(cc) + ['-E', '-P', '-x', lang, '-'],
stdin=subprocess.PIPE, stdout=subprocess.PIPE) stdin=subprocess.PIPE, stdout=subprocess.PIPE)
except OSError: except OSError:
return (False, False, '', '') return (False, False, '', '', False)
with proc: with proc:
proc.stdin.write(b'__clang__ __GNUC__ __GNUC_MINOR__ __GNUC_PATCHLEVEL__ ' proc.stdin.write(b'__clang__ __GNUC__ __GNUC_MINOR__ __GNUC_PATCHLEVEL__ '