mirror of
https://github.com/pestphp/pest.git
synced 2026-12-06 07:42:17 +01:00
fix(tia): keep the run going when git is slow at boot (#2088)
* fix(tia): keep the run going when git is slow at boot * fix(tia): catch GitTimedOut in the boot git calls Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace Pest\Plugins\Tia;
|
||||
|
||||
use Pest\Exceptions\GitTimedOut;
|
||||
use Pest\Support\Git;
|
||||
|
||||
/**
|
||||
@@ -134,12 +135,20 @@ final class Storage
|
||||
|
||||
private static function rawOriginUrl(string $projectRoot): ?string
|
||||
{
|
||||
return new Git($projectRoot)->originUrl();
|
||||
try {
|
||||
return new Git($projectRoot)->originUrl();
|
||||
} catch (GitTimedOut) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private static function gitPrefix(string $projectRoot): string
|
||||
{
|
||||
return new Git($projectRoot)->pathPrefix();
|
||||
try {
|
||||
return new Git($projectRoot)->pathPrefix();
|
||||
} catch (GitTimedOut) {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
private static function slug(string $name): string
|
||||
|
||||
Reference in New Issue
Block a user