Xcode Command Line Tools "xctest" error on fresh install
bdrelling opened this issue Β· comments
Brian Drelling commented
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:
- What's the deal with requiring
xctest
for the command to run? - 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.