Skip to content

Commit cd4292e

Browse files
committed
Pass just the JDK basename to mx, as it can now resolve it
1 parent a4a32f1 commit cd4292e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tool/jt.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,11 @@ def mx(*args, java_home: find_java_home, **options)
623623
# Make sure $JAVA_HOME is not set, as a wrong value causes mx to abort
624624
env['JAVA_HOME'] = nil
625625
else
626-
mx_args.unshift '--java-home', java_home
626+
if java_home.start_with?(JDKS_CACHE_DIR)
627+
mx_args.unshift '--java-home', java_home[JDKS_CACHE_DIR.size+1..-1]
628+
else
629+
mx_args.unshift '--java-home', java_home
630+
end
627631
end
628632

629633
sh(env, find_mx, *mx_args, **options)

0 commit comments

Comments
 (0)