installers: assert jre exists for zipArchiveWithBundledJre

GitOrigin-RevId: c1139ae12b08d7d9a5466b9c759c1c1b54fec8e4
This commit is contained in:
Leonid Shalupov
2021-07-13 16:06:34 +00:00
committed by intellij-monorepo-bot
parent aaaf1cc33d
commit 6ff83f3b52
@@ -106,7 +106,16 @@ final class WindowsDistributionBuilder extends OsSpecificDistributionBuilder {
}
if (customizer.buildZipArchive) {
List<Path> jreDirectoryPaths = customizer.zipArchiveWithBundledJre ? [jreDir] : []
List<Path> jreDirectoryPaths
if (customizer.zipArchiveWithBundledJre) {
if (jreDir == null) {
buildContext.messages.error("Bundled jre is not found, but it's required for .win.zip")
}
jreDirectoryPaths = [jreDir]
} else {
jreDirectoryPaths = []
}
zipPath = buildWinZip(jreDirectoryPaths, ".win", winDistPath)
}