Skip to content

Commit 63fe532

Browse files
committed
[GR-47781] Check that the path returned by TruffleLanguage#getLanguageHome() exists
PullRequest: truffleruby/3972 (cherry picked from commit 29c8244)
1 parent 699e23a commit 63fe532

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/org/truffleruby/RubyLanguage.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,9 @@ private TruffleFile searchRubyHome(Env env) {
756756
if (truffleReported != null) {
757757
var truffleReportedFile = env.getInternalTruffleFile(truffleReported);
758758
try {
759-
truffleReportedFile = truffleReportedFile.getCanonicalFile();
759+
if (truffleReportedFile.exists()) {
760+
truffleReportedFile = truffleReportedFile.getCanonicalFile();
761+
}
760762
} catch (IOException e) {
761763
throw CompilerDirectives.shouldNotReachHere(e);
762764
}

0 commit comments

Comments
 (0)