When compiling curl-sys with static-curl and ssl on macOS, xcodebuild is unconditionally executed to retrieve the Xcode major version. However, these tools aren't always installed. This normally wouldn't be an issue (since the logic can already handle this), except that there's a dialog that pops up prompting the user to install the CLI tools every execution.
According to this Stack Overflow answer, xcode-select -p exits with a nonzero status code if the CLI tools are not installed, so we check that first before attempting to execute xcodebuild.
When compiling
curl-sys
withstatic-curl
andssl
on macOS,xcodebuild
is unconditionally executed to retrieve the Xcode major version. However, these tools aren't always installed. This normally wouldn't be an issue (since the logic can already handle this), except that there's a dialog that pops up prompting the user to install the CLI tools every execution.According to this Stack Overflow answer,
xcode-select -p
exits with a nonzero status code if the CLI tools are not installed, so we check that first before attempting to executexcodebuild
.