package/Distribution: always require CLT.

We always require it in `install.sh` and we need it for all but the
latest version of macOS so this seems a simpler compromise.

Fixes #15802
This commit is contained in:
Mike McQuaid 2023-08-03 11:42:06 +01:00
parent 3ced9156da
commit 39dc5652aa
No known key found for this signature in database
GPG Key ID: 3338A31AFDB1D829

View File

@ -31,13 +31,13 @@
</allowed-os-versions> </allowed-os-versions>
<script> <script>
// See https://developer.apple.com/documentation/installer_js
function installation_check() { function installation_check() {
if (system.files.fileExistsAtPath("/Library/Developer/CommandLineTools/usr/bin/git") || if (system.files.fileExistsAtPath("/Library/Developer/CommandLineTools/usr/bin/git")) {
system.files.fileExistsAtPath("/Applications/Xcode.app/Contents/Developer/usr/bin/git")) {
return true; return true;
} else { } else {
my.result.title = "Xcode Command Line Tools (CLT) are missing"; my.result.title = "Command Line Tools (CLT) are missing";
my.result.message = "You must install the Xcode Command Line Tools (CLT) or Xcode before installing Homebrew. Install the CLT by running `xcode-select --install` from a Terminal."; my.result.message = "You must install the Command Line Tools (CLT) before installing Homebrew by running `xcode-select --install` from a Terminal.";
my.result.type = "Fatal"; my.result.type = "Fatal";
return false; return false;
} }