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

Fix IntelliJ cleanup logic for macOs #301

Conversation

LukaszKontowski
Copy link
Contributor

@LukaszKontowski LukaszKontowski commented Oct 25, 2022

Related to #238 (but does not close it).

Fixes IntelliJ cleanup logic for macOs and makes SingleRunFixtureTest tests succeed on macOs if .dmg extension is used as probe.intellij.version.ext.

@LukaszKontowski LukaszKontowski added the bug Something isn't working label Oct 25, 2022
@LukaszKontowski LukaszKontowski self-assigned this Oct 25, 2022
@LukaszKontowski LukaszKontowski changed the title Fix/single run fixture test mac os Fix IntelliJ cleanup logic for macOs Oct 25, 2022
Comment on lines +230 to +231
if (OS.Current == OS.Mac && root.name == "Contents")
root.getParent.delete()
Copy link
Contributor Author

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)

@@ -56,8 +56,9 @@ final class SingleRunFixtureTest extends IdeProbeFixture with WorkspaceFixture w

@Test
def removesDirectoriesEvenAfterFailureToRunIntelliJ(): Unit = {
val intellijLauncher = if (OS.Current == OS.Mac) "idea" else "idea.sh"
Copy link
Contributor

@PawelLipski PawelLipski Oct 26, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of curiosity, what's the type of this idea file on Mac (type in the sense of e.g. file command?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me paste the output of the file command:

lkontowski@lkontowski-MacBook-Pro /Applications/IntelliJ IDEA CE.app/Contents/MacOS 
% file idea
idea: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64
- Mach-O 64-bit executable x86_64] [arm64:Mach-O 64-bit executable arm64
- Mach-O 64-bit executable arm64]
idea (for architecture x86_64):	Mach-O 64-bit executable x86_64
idea (for architecture arm64):	Mach-O 64-bit executable arm64

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay... so not a script (idea.sh), as on Linux

Copy link
Contributor

Choose a reason for hiding this comment

The 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

@LukaszKontowski LukaszKontowski merged commit f6299e4 into VirtusLab:master Oct 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants