openbakery / gradle-xcodePlugin

gradle plugin for building Xcode Projects for iOS, watchOS, macOS or tvOS
Apache License 2.0
458 stars 129 forks source link

Better messaging when spotlight indexing is disabled. #394

Closed phatblat closed 3 years ago

phatblat commented 6 years ago

Since this plugin uses the mdfind command to locate all the installed versions of Xcode, it breaks when spotlight indexing is disabled, with a message such as:

No Xcode found with build number 9.2

Option 1

Include a generic message with the above error, such as:

Check to make sure you have Xcode installed and Spotlight indexing is enabled

Option 2

Emit a warning (or error?) when spotlight indexing is disabled.

Spotlight Disabled

mdutil -s /
/:
    Indexing and searching disabled.

Spotlight Enabled

mdutil -s /
/:
    Indexing enabled.