Fix configuration retrieval by using the extension's name instead of a formatted version

This commit is contained in:
crazywhalecc 2026-03-06 19:20:16 +08:00
parent 32b7fee8d8
commit 368ce75261
No known key found for this signature in database
GPG Key ID: 1F4BDD59391F2680

View File

@ -80,7 +80,7 @@ class PhpExtensionPackage extends Package
}
$escapedPath = str_replace("'", '', escapeshellarg(BUILD_ROOT_PATH)) !== BUILD_ROOT_PATH || str_contains(BUILD_ROOT_PATH, ' ') ? escapeshellarg(BUILD_ROOT_PATH) : BUILD_ROOT_PATH;
$name = str_replace('_', '-', $this->getExtensionName());
$ext_config = PackageConfig::get($name, 'php-extension', []);
$ext_config = PackageConfig::get($this->getName(), 'php-extension', []);
$arg_type = match (SystemTarget::getTargetOS()) {
'Windows' => $ext_config['arg-type@windows'] ?? $ext_config['arg-type'] ?? 'enable',