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