Skip to content

Commit

Permalink
Fix issue JetBrains#1777. IOB exception caused by "-XX:+AutoCreateSha…
Browse files Browse the repository at this point in the history
…redArchive" parameter not containing "=".
  • Loading branch information
AlexanderBartash committed Oct 5, 2024
1 parent 7c2322f commit bfbb255
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

- Fixed issue #1778 by removing a hash of the absolute artifact path appended to the end of the version string. That hash made artifact version different on different PCs and also breaks Gradle dependency locking.
- Add the missing `org.jetbrains.kotlin.platform.type=jvm` attribute to the `intellijPlatformRuntimeClasspath` configuration manually as it's not inherited from the `runtimeClasspath`.
- Fix #1777: IOB exception while running tests from Gradle.

## [2.1.0]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,15 +173,18 @@ internal fun ProductInfo.launchFor(architecture: String): ProductInfo.Launch {
*
* @receiver JVM argument with IDE home placeholder
*/
internal fun String.resolveIdeHomeVariable(platformPath: Path) =
internal fun String.resolveIdeHomeVariable(platformPath: Path): =
platformPath.pathString.let {
this
.replace("\$APP_PACKAGE", it)
this.replace("\$APP_PACKAGE", it)
.replace("\$IDE_HOME", it)
.replace("%IDE_HOME%", it)
.replace("Contents/Contents", "Contents")
.let { entry ->
val (_, value) = entry.split("=")
val delimiters = "="
if (!entry.contains(delimiters)) {
return entry
}
val (_, value) = entry.split(delimiters)
when {
runCatching { Path(value).exists() }.getOrElse { false } -> entry
else -> entry.replace("/Contents", "")
Expand Down

0 comments on commit bfbb255

Please sign in to comment.