Fix x86_64 macOS bison finder path

This commit is contained in:
crazywhalecc 2025-07-31 00:09:13 +08:00
parent fcdb029b10
commit cb0ea67a28
No known key found for this signature in database
GPG Key ID: 1F4BDD59391F2680
2 changed files with 3 additions and 3 deletions

View File

@ -79,7 +79,7 @@ class MacOSToolCheckList
if ($command_path !== []) { if ($command_path !== []) {
return CheckResult::fail("Current {$bison} version is too old: " . $matches[0]); return CheckResult::fail("Current {$bison} version is too old: " . $matches[0]);
} }
return $this->checkBisonVersion(['/opt/homebrew/opt/bison/bin', '/usr/local/homebrew/opt/bison/bin']); return $this->checkBisonVersion(['/opt/homebrew/opt/bison/bin', '/usr/local/opt/bison/bin']);
} }
return CheckResult::ok($matches[0]); return CheckResult::ok($matches[0]);
} }

View File

@ -114,10 +114,10 @@ class GlobalEnvManager
} }
// test bison // test bison
if (PHP_OS_FAMILY === 'Darwin') { if (PHP_OS_FAMILY === 'Darwin') {
if ($bison = SystemUtil::findCommand('bison', ['/opt/homebrew/opt/bison/bin', '/usr/local/homebrew/opt/bison/bin'])) { if ($bison = SystemUtil::findCommand('bison', ['/opt/homebrew/opt/bison/bin', '/usr/local/opt/bison/bin'])) {
self::putenv("BISON={$bison}"); self::putenv("BISON={$bison}");
} }
if ($yacc = SystemUtil::findCommand('yacc', ['/opt/homebrew/opt/bison/bin', '/usr/local/homebrew/opt/bison/bin'])) { if ($yacc = SystemUtil::findCommand('yacc', ['/opt/homebrew/opt/bison/bin', '/usr/local/opt/bison/bin'])) {
self::putenv("YACC={$yacc}"); self::putenv("YACC={$yacc}");
} }
} }