mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-03-18 05:04:51 +08:00
fix action runner stty issue for phpunit (#109)
This commit is contained in:
parent
f1c730962b
commit
47ce0a8e9c
@ -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;
|
||||
|
||||
@ -10,3 +10,4 @@ parameters:
|
||||
- '#Unsafe usage of new static#'
|
||||
dynamicConstantNames:
|
||||
- SWOOLE_VERSION
|
||||
- ZM_TEST_LOG_DEBUG
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user