File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -298,7 +298,7 @@ public function runCliCheckUnix(): void
298298 // Run compile check if build target is cli
299299 // If you need to run some check, overwrite this or add your assert in src/globals/ext-tests/{extension_name}.php
300300 $ sharedExtensions = $ this ->getSharedExtensionLoadString ();
301- [$ ret, $ out ] = shell ()->execWithResult (BUILD_BIN_PATH . '/php -n ' . $ sharedExtensions . ' --ri " ' . $ this ->getDistName () . '" ' );
301+ [$ ret ] = shell ()->execWithResult (BUILD_BIN_PATH . '/php -n ' . $ sharedExtensions . ' --ri " ' . $ this ->getDistName () . '" ' );
302302 if ($ ret !== 0 ) {
303303 throw new ValidationException (
304304 "extension {$ this ->getName ()} failed compile check: php-cli returned {$ ret }" ,
@@ -328,7 +328,7 @@ public function runCliCheckWindows(): void
328328 {
329329 // Run compile check if build target is cli
330330 // If you need to run some check, overwrite this or add your assert in src/globals/ext-tests/{extension_name}.php
331- [$ ret ] = cmd ()->execWithResult (BUILD_ROOT_PATH . '/bin /php.exe -n --ri " ' . $ this ->getDistName () . '" ' , false );
331+ [$ ret ] = cmd ()->execWithResult (BUILD_BIN_PATH . '/php.exe -n --ri " ' . $ this ->getDistName () . '" ' , false );
332332 if ($ ret !== 0 ) {
333333 throw new ValidationException ("extension {$ this ->getName ()} failed compile check: php-cli returned {$ ret }" , validation_module: "Extension {$ this ->getName ()} sanity check " );
334334 }
Original file line number Diff line number Diff line change 55namespace SPC \builder \extension ;
66
77use SPC \builder \Extension ;
8+ use SPC \exception \ValidationException ;
89use SPC \store \FileSystem ;
910use SPC \util \CustomExt ;
1011use SPC \util \SPCTarget ;
@@ -36,6 +37,15 @@ public function buildUnixShared(): void
3637 parent ::buildUnixShared ();
3738 }
3839
40+ public function runCliCheckUnix (): void
41+ {
42+ parent ::runCliCheckUnix ();
43+ [$ ret , $ out ] = shell ()->execWithResult ('printf "exit\n" | ' . BUILD_BIN_PATH . '/php -a ' );
44+ if ($ ret !== 0 || !str_contains (implode ("\n" , $ out ), 'Interactive shell ' )) {
45+ throw new ValidationException ("readline extension failed sanity check. Code: {$ ret }, output: " . implode ("\n" , $ out ));
46+ }
47+ }
48+
3949 public static function patchCliLinux (bool $ patch ): void
4050 {
4151 if (SPCTarget::getTargetOS () === 'Linux ' && SPCTarget::isStatic () && $ patch ) {
You can’t perform that action at this time.
0 commit comments