yonaskolb / Mint

A package manager that installs and runs executable Swift packages
MIT License
2.27k stars 122 forks source link

Xcode Command Line Tools "xctest" error on fresh install #225

Open bdrelling opened 2 years ago

bdrelling commented 2 years ago

I ran the following two commands:

brew install mint
mint run swiftformat .

The output I get is:

🌱 Cloning SwiftFormat 0.48.16
🌱 Resolving package
error: terminated(72): /usr/bin/xcrun --sdk macosx --find xctest output:
    xcrun: error: unable to find utility "xctest", not a developer tool or in PATH
🌱 Encountered error during "swift package resolve". Use --verbose to see full output

I looked up the error and found a StackOverflow post mentioning to simply set the Location in Xcode, which I had not yet done. When I ran xcode-select -p, the output was /Library/Developer/CommandLineTools. After changing the Xcode location, everything worked.

My questions/asks are:

  1. What's the deal with requiring xctest for the command to run?
  2. The installation instructions (a) still mention Xcode 10.2, not even 10.2 and later, and (b) should include note of this if it's not only required to install, but set the Command Line Tools location afterwards.