-
Notifications
You must be signed in to change notification settings - Fork 13
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
Fix IntelliJ cleanup logic for macOs #301
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
package org.virtuslab.ideprobe.dependencies | ||
|
||
import org.virtuslab.ideprobe.OS | ||
|
||
import java.nio.file.Files | ||
import java.nio.file.Path | ||
import java.nio.file.Paths | ||
|
@@ -19,7 +21,6 @@ import org.virtuslab.ideprobe.Config | |
import org.virtuslab.ideprobe.Extensions._ | ||
import org.virtuslab.ideprobe.IdeProbeFixture | ||
import org.virtuslab.ideprobe.IntelliJFixture | ||
import org.virtuslab.ideprobe.OS | ||
import org.virtuslab.ideprobe.Shell | ||
import org.virtuslab.ideprobe.SingleRunIntelliJ | ||
|
||
|
@@ -56,8 +57,9 @@ final class SingleRunFixtureTest extends IdeProbeFixture with WorkspaceFixture w | |
|
||
@Test | ||
def removesDirectoriesEvenAfterFailureToRunIntelliJ(): Unit = { | ||
val intellijLauncher = if (OS.Current == OS.Mac) "idea" else "idea.sh" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Out of curiosity, what's the type of this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let me paste the output of the
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay... so not a script ( There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it is an objective c app that reads some stuff from plist, modifies vmoptions and starts IJ |
||
val intelliJFixture = IntelliJFixture().withAfterIntelliJInstall((_, intellij) => | ||
Files.delete(intellij.paths.root.resolve("bin").resolve("idea.sh")) // To prevent the IDE from launching. | ||
Files.delete(intellij.paths.root.resolve("bin").resolve(intellijLauncher)) // To prevent the IDE from launching. | ||
) | ||
|
||
val instancesDir = intelliJFixture.intelliJProvider.paths.instances | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As we want to delete whole IntelliJ instance directory, not only
Contents/
(which is a subdirectory)