Skip to content

Commit

Permalink
..
Browse files Browse the repository at this point in the history
  • Loading branch information
infiniteregrets committed Dec 15, 2023
1 parent 32f638d commit c7e2b3b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/test/kotlin/com/metalbear/mirrord/MirrordPluginTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@ internal class MirrordPluginTest {
val pluginPath = Paths.get(System.getProperty("test.plugin.path"))
println("downloading IDE...")
val pathToIde = ideDownloader.downloadAndExtract(Ide.PYCHARM_COMMUNITY, tmpDir, Ide.BuildType.RELEASE)

val startUpScriptPath = File(pathToIde.resolve("bin/pycharm.sh").toAbsolutePath().toString())
val originalScript = startUpScriptPath.readText()
println("original startup script: \n $originalScript")
val patchedStartUpScript = originalScript.replace("exec \"\$JAVA_BIN\"", "\"\$JAVA_BIN\"")
startUpScriptPath.writeText(patchedStartUpScript)

ideaProcess = IdeLauncher.launchIde(
pathToIde,
mapOf(
Expand All @@ -65,11 +72,6 @@ internal class MirrordPluginTest {
tmpDir
)

val startUpScriptPath = File(pathToIde.resolve("bin/pycharm.sh").toAbsolutePath().toString())
val originalScript = startUpScriptPath.readText()
println("original startup script: \n $originalScript")
val patchedStartUpScript = originalScript.replace("exec \"\$JAVA_BIN\"", "\"\$JAVA_BIN\"")
startUpScriptPath.writeText(patchedStartUpScript)

println("waiting for IDE... using startup script: \n $patchedStartUpScript")

Expand Down

0 comments on commit c7e2b3b

Please sign in to comment.