mirror of
https://github.com/pestphp/pest.git
synced 2026-12-04 23:15:06 +01:00
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>
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
<?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)));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user