Skip to content

Commit d7ca27b

Browse files
committed
determine java executable suffix
1 parent 4efdcb2 commit d7ca27b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mx.graalpython/mx_graalpython.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ def graalpy_standalone_home(standalone_type, enterprise=False, dev=False, build=
565565
python_home = os.path.abspath(glob.glob(python_home)[0])
566566
mx.log("Using GraalPy standalone from GRAALPY_HOME: " + python_home)
567567
# Try to verify that we're getting what we expect:
568-
has_java = os.path.exists(os.path.join(python_home, 'jvm', 'bin', 'java.exe' if WIN32 else 'java'))
568+
has_java = os.path.exists(os.path.join(python_home, 'jvm', 'bin', mx.exe_suffix('java')))
569569
if has_java != (standalone_type == 'jvm'):
570570
mx.abort(f"GRAALPY_HOME is not compatible with the requested distribution type.\n"
571571
f"jvm/bin/java exists?: {has_java}, requested type={standalone_type}.")
@@ -667,7 +667,7 @@ def graalvm_jdk():
667667
mx.log("Using GraalPy standalone from GRAAL_JDK_HOME: " + graal_jdk_home)
668668

669669
# Try to verify that we're getting what we expect:
670-
has_java = os.path.exists(os.path.join(graal_jdk_home, 'bin', 'java.exe' if WIN32 else 'java'))
670+
has_java = os.path.exists(os.path.join(graal_jdk_home, 'bin', mx.exe_suffix('java')))
671671
if not has_java:
672672
mx.abort(f"GRAAL_JDK_HOME does not contain java executable.")
673673

0 commit comments

Comments
 (0)