From 52ed0e2cee9a136d0d60005ead8b98f2c7786ec5 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Wed, 7 Feb 2024 01:19:54 +0800 Subject: [PATCH] add glibtoolize check for macos --- src/SPC/doctor/item/MacOSToolCheckList.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/SPC/doctor/item/MacOSToolCheckList.php b/src/SPC/doctor/item/MacOSToolCheckList.php index 9f43e8fb..6bbeb864 100644 --- a/src/SPC/doctor/item/MacOSToolCheckList.php +++ b/src/SPC/doctor/item/MacOSToolCheckList.php @@ -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;