set extension dir before

This commit is contained in:
DubbleClick
2025-05-25 18:29:34 +07:00
parent d833d8946c
commit e2ea10d2eb
4 changed files with 10 additions and 4 deletions

View File

@@ -37,7 +37,9 @@ class swoole_hook_sqlite extends Extension
if ($this->builder->getExt('swoole') === null) {
return;
}
[$ret, $out] = shell()->execWithResult(BUILD_ROOT_PATH . '/bin/php -n --ri "swoole"', false);
$sharedExtensions = $this->getSharedExtensionLoadString();
putenv('EXTENSION_DIR=' . BUILD_MODULES_PATH);
[$ret, $out] = shell()->execWithResult(BUILD_BIN_PATH . '/php -n' . $sharedExtensions . ' --ri "' . $this->getDistName() . '"');
$out = implode('', $out);
if ($ret !== 0) {
throw new RuntimeException('extension ' . $this->getName() . ' failed compile check: php-cli returned ' . $ret);