File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
graalpython/com.oracle.graal.python.test/src/com/oracle/graal/python/test Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -57,11 +57,13 @@ private static String discoverHomeFromSource() throws IOException {
57
57
final Path codeDir = codeLocation .getParent ();
58
58
59
59
// executing from jar file in source tree
60
- if (codeDir .endsWith (Paths .get ("mxbuild" , "dists" ))) {
61
- final Path candidate = codeDir .getParent ().getParent ().resolve ("graalpython" );
62
- if (isGraalPythonHome (candidate )) {
63
- // Jar source build
64
- return candidate .toFile ().getCanonicalPath ().toString ();
60
+ for (Path cur = codeDir ; cur .getNameCount () >= 2 ; cur = cur .getParent ()) {
61
+ if (cur .endsWith (Paths .get ("mxbuild" , "dists" ))) {
62
+ final Path candidate = cur .getParent ().getParent ().resolve ("graalpython" );
63
+ if (isGraalPythonHome (candidate )) {
64
+ // Jar source build
65
+ return candidate .toFile ().getCanonicalPath ().toString ();
66
+ }
65
67
}
66
68
}
67
69
You can’t perform that action at this time.
0 commit comments