mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-04 23:35:40 +08:00
Add php extension OS support checks to PackageInstaller
This commit is contained in:
@@ -755,6 +755,14 @@ class PackageInstaller
|
||||
private function validatePackagesBeforeBuild(): void
|
||||
{
|
||||
foreach ($this->packages as $package) {
|
||||
// Check OS support for php-extension packages
|
||||
if ($package instanceof PhpExtensionPackage && !$package->isSupportedOnCurrentOS()) {
|
||||
$supported = implode(', ', $package->getSupportedOSList());
|
||||
throw new WrongUsageException(
|
||||
"Extension '{$package->getName()}' is not supported on current OS: " . SystemTarget::getTargetOS() .
|
||||
". Supported OS: [{$supported}]"
|
||||
);
|
||||
}
|
||||
if ($package->getType() !== 'library') {
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user