mirror of
https://github.com/pestphp/pest.git
synced 2026-12-03 22:45:06 +01:00
8c635c5ba0
* fix(tia): report a git timeout like any other git failure * fix(tia): raise a git timeout so no git helper reads it as an answer * test(tia): cover a slow git check-ignore and stop probing git after a timeout --------- Co-authored-by: Punyapal Shah <mrpunyapal@gmail.com>
25 lines
650 B
PHP
25 lines
650 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Pest\Exceptions;
|
|
|
|
use NunoMaduro\Collision\Contracts\RenderlessEditor;
|
|
use NunoMaduro\Collision\Contracts\RenderlessTrace;
|
|
use RuntimeException;
|
|
use Symfony\Component\Console\Exception\ExceptionInterface;
|
|
|
|
/**
|
|
* @internal
|
|
*/
|
|
final class GitTimedOut extends RuntimeException implements ExceptionInterface, RenderlessEditor, RenderlessTrace
|
|
{
|
|
/**
|
|
* @param array<int, string> $arguments
|
|
*/
|
|
public function __construct(array $arguments, float $timeout)
|
|
{
|
|
parent::__construct(sprintf('Git did not answer within %s seconds: git %s', $timeout, implode(' ', $arguments)));
|
|
}
|
|
}
|