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
298
298
// Run compile check if build target is cli
299
299
// If you need to run some check, overwrite this or add your assert in src/globals/ext-tests/{extension_name}.php
300
300
$ 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 () . '" ' );
302
302
if ($ ret !== 0 ) {
303
303
throw new ValidationException (
304
304
"extension {$ this ->getName ()} failed compile check: php-cli returned {$ ret }" ,
@@ -328,7 +328,7 @@ public function runCliCheckWindows(): void
328
328
{
329
329
// Run compile check if build target is cli
330
330
// 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 );
332
332
if ($ ret !== 0 ) {
333
333
throw new ValidationException ("extension {$ this ->getName ()} failed compile check: php-cli returned {$ ret }" , validation_module: "Extension {$ this ->getName ()} sanity check " );
334
334
}
Original file line number Diff line number Diff line change 5
5
namespace SPC \builder \extension ;
6
6
7
7
use SPC \builder \Extension ;
8
+ use SPC \exception \ValidationException ;
8
9
use SPC \store \FileSystem ;
9
10
use SPC \util \CustomExt ;
10
11
use SPC \util \SPCTarget ;
@@ -36,6 +37,15 @@ public function buildUnixShared(): void
36
37
parent ::buildUnixShared ();
37
38
}
38
39
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
+
39
49
public static function patchCliLinux (bool $ patch ): void
40
50
{
41
51
if (SPCTarget::getTargetOS () === 'Linux ' && SPCTarget::isStatic () && $ patch ) {
You can’t perform that action at this time.
0 commit comments