From 173692d05d0b2f1f56290f787790076004cd54fb Mon Sep 17 00:00:00 2001 From: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> Date: Sat, 20 Apr 2024 13:19:55 +0200 Subject: [PATCH] [Web] Fix building for web on Windows On Windows the command for emscripten are provided as `.bat` files, which causes the compiler version check to fail without `shell=True` --- methods.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/methods.py b/methods.py index 8498310bf521..f0e51c7d6f66 100644 --- a/methods.py +++ b/methods.py @@ -926,7 +926,11 @@ def get_compiler_version(env): # Not using -dumpversion as some GCC distros only return major, and # Clang used to return hardcoded 4.2.1: # https://reviews.llvm.org/D56803 try: - version = subprocess.check_output([env.subst(env["CXX"]), "--version"]).strip().decode("utf-8") + version = ( + subprocess.check_output([env.subst(env["CXX"]), "--version"], shell=(os.name == "nt")) + .strip() + .decode("utf-8") + ) except (subprocess.CalledProcessError, OSError): print("Couldn't parse CXX environment variable to infer compiler version.") return ret