Improve a reported message if -jdk-home path does not exist.
Fix KT-18794
This commit is contained in:
committed by
Alexander Udalov
parent
994b6d687c
commit
61e52f0bfe
@@ -407,6 +407,10 @@ class K2JVMCompiler : CLICompiler<K2JVMCompilerArguments>() {
|
||||
|
||||
val (jdkHome, classesRoots) = if (arguments.jdkHome != null) {
|
||||
val jdkHome = File(arguments.jdkHome)
|
||||
if (!jdkHome.exists()) {
|
||||
messageCollector.report(ERROR, "JDK home directory does not exist: $jdkHome")
|
||||
return COMPILATION_ERROR
|
||||
}
|
||||
messageCollector.report(LOGGING, "Using JDK home directory $jdkHome")
|
||||
jdkHome to PathUtil.getJdkClassesRoots(jdkHome)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user