Skip to content

Commit eb30f64

Browse files
committed
fix: Convert path separators for Windows
1 parent 19bb187 commit eb30f64

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

methods.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -712,8 +712,9 @@ def get_compiler_version(env):
712712
# Not using -dumpversion as some GCC distros only return major, and
713713
# Clang used to return hardcoded 4.2.1: # https://reviews.llvm.org/D56803
714714
try:
715+
cxx_path = env["CXX"].replace("\\", "/") # win32
715716
version = subprocess.check_output(
716-
shlex.split(env.subst(env["CXX"])) + ["--version"], shell=(os.name == "nt"), encoding="utf-8"
717+
shlex.split(env.subst(cxx_path)) + ["--version"], shell=(os.name == "nt"), encoding="utf-8"
717718
).strip()
718719
except (subprocess.CalledProcessError, OSError):
719720
print_warning("Couldn't parse CXX environment variable to infer compiler version.")

0 commit comments

Comments
 (0)