mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
add glibtoolize check for macos
This commit is contained in:
parent
39754cde59
commit
52ed0e2cee
@ -31,6 +31,7 @@ class MacOSToolCheckList
|
||||
'gzip',
|
||||
'bzip2',
|
||||
'cmake',
|
||||
'glibtoolize',
|
||||
];
|
||||
|
||||
#[AsCheckItem('if homebrew has installed', limit_os: 'Darwin', level: 998)]
|
||||
@ -72,8 +73,14 @@ class MacOSToolCheckList
|
||||
#[AsFixItem('build-tools')]
|
||||
public function fixBuildTools(array $missing): bool
|
||||
{
|
||||
$replacement = [
|
||||
'glibtoolize' => 'libtool',
|
||||
];
|
||||
foreach ($missing as $cmd) {
|
||||
try {
|
||||
if (isset($replacement[$cmd])) {
|
||||
$cmd = $replacement[$cmd];
|
||||
}
|
||||
shell(true)->exec('brew install --formula ' . escapeshellarg($cmd));
|
||||
} catch (RuntimeException) {
|
||||
return false;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user