Skip to content

Commit

Permalink
Don't fail fast if runtime not found
Browse files Browse the repository at this point in the history
We already fail at launch if there's no runtime. It is possible in a
multi-runtime scenario that missing one (or more) is acceptable.
  • Loading branch information
hinerm committed May 3, 2024
1 parent 20f4317 commit 4a0e940
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/commonMain/kotlin/jvm.kt
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@ class JvmRuntimeConfig(recognizedArgs: Array<String>) :
break
}
}
if (java == null) fail("No Java installation found.")
if (java == null) {
debug("No Java installation found.")
return
}
debug("Successfully discovered Java installation:")
debug("* rootPath -> ", java.rootPath)
debug("* libjvmPath -> ", java.libjvmPath ?: "<null>")
Expand Down
5 changes: 4 additions & 1 deletion src/commonMain/kotlin/python.kt
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ class PythonRuntimeConfig(recognizedArgs: Array<String>) :
break
}
}
if (python == null) fail("No Python installation found.")
if (python == null) {
debug("No Python installation found.")
return
}
debug("Successfully discovered Python installation:")
debug("* rootPath -> ", python.rootPath)
debug("* libPythonPath -> ", python.libPythonPath ?: "<null>")
Expand Down

0 comments on commit 4a0e940

Please sign in to comment.