Skip to content

Commit ee186b0

Browse files
committed
Fix using the legacy GraalVM layout
1 parent 3cfb6bc commit ee186b0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

graalpython/com.oracle.graal.python.shell/src/com/oracle/graal/python/shell/GraalPythonMain.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -943,6 +943,11 @@ private void findAndApplyVenvCfg(Builder contextBuilder, String executable) {
943943
}
944944
if (Files.exists(baseExecutable)) {
945945
contextBuilder.option("python.BaseExecutable", baseExecutable.toString());
946+
/*
947+
* This is needed to support the legacy GraalVM layout where the
948+
* executable is a symlink into the 'languages' directory.
949+
*/
950+
contextBuilder.option("python.PythonHome", baseExecutable.getParent().getParent().toString());
946951
}
947952
} catch (NullPointerException | InvalidPathException ex) {
948953
// NullPointerException covers the possible null result of getParent()

0 commit comments

Comments
 (0)