Files
pest/src/Exceptions/GitTimedOut.php
T
Jhon Farias 8c635c5ba0 fix(tia): report a git timeout like any other git failure (#2069)
* 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>
2026-11-30 18:38:29 +05:30

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)));
}
}