Skip to content

Commit 4eb7a17

Browse files
committed
[GR-14629] Hotfix: be more forgiving if CoreHome is not set.
PullRequest: graalpython/456
2 parents b63bee6 + aa99ddd commit 4eb7a17

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/InteropModuleBuiltins.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public void initialize(PythonCore core) {
104104
try {
105105
TruffleFile coreDir = env.getTruffleFile(coreHome);
106106
TruffleFile docDir = coreDir.resolveSibling("doc");
107-
if (docDir.exists() || (docDir = coreDir.getParent().resolveSibling("doc")).exists()) {
107+
if (docDir.exists() || docDir.getParent() != null && (docDir = coreDir.getParent().resolveSibling("doc")).exists()) {
108108
builtinConstants.put(SpecialAttributeNames.__DOC__, new String(docDir.resolve("INTEROP.md").readAllBytes()));
109109
}
110110
} catch (SecurityException | IOException e) {

0 commit comments

Comments
 (0)