mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 12:54:52 +08:00
add macOS brew arch check for doctor
This commit is contained in:
parent
e3c542d9df
commit
847535721c
@ -37,10 +37,12 @@ class MacOSToolCheckList
|
|||||||
#[AsCheckItem('if homebrew has installed', limit_os: 'Darwin', level: 998)]
|
#[AsCheckItem('if homebrew has installed', limit_os: 'Darwin', level: 998)]
|
||||||
public function checkBrew(): ?CheckResult
|
public function checkBrew(): ?CheckResult
|
||||||
{
|
{
|
||||||
// 检查 homebrew 是否已经安装
|
if (($path = $this->findCommand('brew')) === null) {
|
||||||
if ($this->findCommand('brew') === null) {
|
|
||||||
return CheckResult::fail('Homebrew is not installed', 'brew');
|
return CheckResult::fail('Homebrew is not installed', 'brew');
|
||||||
}
|
}
|
||||||
|
if ($path !== '/opt/homebrew/bin/brew' && php_uname('m') === 'arm64') {
|
||||||
|
return CheckResult::fail('Current homebrew (/usr/local/bin/homebrew) is not installed for M1 Mac, please re-install homebrew in /opt/homebrew/ !');
|
||||||
|
}
|
||||||
return CheckResult::ok();
|
return CheckResult::ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user