Correct doctor fix

This commit is contained in:
crazywhalecc
2026-03-20 11:32:15 +08:00
parent e9be3a41db
commit dc79ac9c9a

View File

@@ -65,10 +65,10 @@ class MacOSToolCheck
if (getenv('SPC_USE_LLVM') === 'brew') {
$homebrew_prefix = getenv('HOMEBREW_PREFIX') ?: (SystemTarget::getTargetArch() === 'aarch64' ? '/opt/homebrew' : '/usr/local/homebrew');
if (MacOSUtil::findCommand('clang', ["{$homebrew_prefix}/opt/llvm/bin"]) === null) {
return CheckResult::fail('Homebrew llvm is not installed', 'brew', ['missing' => ['llvm']]);
if (($path = MacOSUtil::findCommand('clang', ["{$homebrew_prefix}/opt/llvm/bin"])) === null) {
return CheckResult::fail('Homebrew llvm is not installed', 'build-tools', ['missing' => ['llvm']]);
}
return CheckResult::ok();
return CheckResult::ok($path);
}
return null;
}