Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install GraalVM Components in Temp Directory #1660

Merged
merged 1 commit into from
Apr 9, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -697,11 +697,16 @@ class RuntimeVersionManager(
}

try {
val temporaryRuntime = loadGraalRuntime(runtimeTemporaryPath)
if (temporaryRuntime.isFailure) {
val temporaryRuntime =
loadGraalRuntime(runtimeTemporaryPath).getOrElse {
throw InstallationError(
"Cannot load the installed runtime. The package may have been " +
"corrupted. Reverting installation."
)
}
installRequiredRuntimeComponents(temporaryRuntime, os).getOrElse {
throw InstallationError(
"Cannot load the installed runtime. The package may have been " +
"corrupted. Reverting installation."
"fatal: Cannot install the required runtime components."
)
}

Expand All @@ -714,13 +719,6 @@ class RuntimeVersionManager(
"fatal: Cannot load the installed runtime."
)
}
installRequiredRuntimeComponents(runtime, os).getOrElse {
FileSystem.removeDirectory(runtimePath)
throw InstallationError(
"fatal: Cannot install the required runtime components."
)
}

userInterface.logInfo(s"Installed $runtime.")

runtime
Expand Down