mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-02 14:25:38 +08:00
fix action runner stty issue for phpunit (#109)
This commit is contained in:
@@ -12,9 +12,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace PHPUnit\Runner;
|
||||
|
||||
use SebastianBergmann\Version as VersionId;
|
||||
use function array_slice;
|
||||
use function dirname;
|
||||
use function explode;
|
||||
use function implode;
|
||||
use function strpos;
|
||||
@@ -44,8 +42,9 @@ final class Version
|
||||
}
|
||||
|
||||
if (self::$version === '') {
|
||||
$cmd = "grep -Eo '\\d+.\\d+.\\d+' --color=never " . __DIR__ . '/../../vendor/phpunit/phpunit/src/Runner/Version.php';
|
||||
self::$version = trim(exec($cmd));
|
||||
$file = __DIR__ . '/../../vendor/phpunit/phpunit/src/Runner/Version.php';
|
||||
preg_match('/\d+.\d+.\d+/', file_get_contents($file), $match);
|
||||
self::$version = $match[0];
|
||||
}
|
||||
|
||||
return self::$version;
|
||||
|
||||
Reference in New Issue
Block a user