Skip to content

Find Intellij installations with Spotlight query on macOS - #80479

Merged
fluttergithubbot merged 2 commits into
flutter:masterfrom
jmagman:intellij-spotlight
Apr 16, 2021
Merged

fluttergithubbot merged 2 commits into
flutter:masterfrom
jmagman:intellij-spotlight

Conversation

@jmagman

@jmagman jmagman commented Apr 15, 2021 •

Copy link
Copy Markdown
Member

In addition to hard-coded Applications Intellij install locations, on macOS also query Spotlight (the app search engine when you cmd-space) for all installs by searching with the command line tool mdfind for the app's bundle identifier (com.jetbrains.intellij.ce or fall back to com.jetbrains.intellij*).

Now on my machine I see IntelliJ IDEA where I didn't before because the (stable) suffix in the app names prevented it from showing up:

[✓] IntelliJ IDEA Community Edition (version 2020.2.2)
    • IntelliJ at /Applications/IntelliJ CE (stable).app
    • Flutter plugin version 52.2.3
    • Dart plugin version 202.8443

[✓] IntelliJ IDEA Ultimate Edition (version 2020.2.2)
    • IntelliJ at /Applications/IntelliJ UE (stable).app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

Fixes #43964

See also #80475 and #80477

@jmagman jmagman added tool Affects the "flutter" command-line tool. See also t: labels. platform-macos Building on or for macOS specifically t: flutter doctor Problem related to the "flutter doctor" tool labels Apr 15, 2021
@jmagman jmagman self-assigned this Apr 15, 2021
@google-cla google-cla Bot added the cla: yes label Apr 15, 2021

@gspencergoog gspencergoog left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

32384589-a60f0e74-c078-11e7-9bc1-e5b5287aea9d

Thanks for adding that!


final ProcessResult ultimateQueryResult = processManager.runSync(<String>[
'mdfind',
'kMDItemCFBundleIdentifier="com.jetbrains.intellij*"',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

mdfind handles glob parsing?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@christopherfujino christopherfujino left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@fluttergithubbot
fluttergithubbot merged commit e197a96 into flutter:master Apr 16, 2021
@jmagman
jmagman deleted the intellij-spotlight branch April 16, 2021 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

platform-macos Building on or for macOS specifically t: flutter doctor Problem related to the "flutter doctor" tool tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flutter doctor not recognizing "IntelliJ IDEA 2.app" on mac OSX

4 participants