mirror of
https://github.com/pestphp/pest.git
synced 2026-03-10 01:37:21 +01:00
fix: --retry with parallel
This commit is contained in:
@ -5,6 +5,7 @@ declare(strict_types=1);
|
||||
namespace Pest\Plugins;
|
||||
|
||||
use Pest\Contracts\Plugins\HandlesArguments;
|
||||
use Pest\Exceptions\InvalidOption;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
@ -19,10 +20,15 @@ final class Retry implements HandlesArguments
|
||||
public function handleArguments(array $arguments): array
|
||||
{
|
||||
if ($this->hasArgument('--retry', $arguments)) {
|
||||
if ($this->hasArgument('--parallel', $arguments)) {
|
||||
throw new InvalidOption('The --retry option is not supported when running in parallel.');
|
||||
}
|
||||
|
||||
$arguments = $this->popArgument('--retry', $arguments);
|
||||
|
||||
$arguments = $this->pushArgument('--order-by=defects', $arguments);
|
||||
$arguments = $this->pushArgument(' --stop-on-defect', $arguments);
|
||||
|
||||
$arguments = $this->pushArgument('--stop-on-failure', $arguments);
|
||||
}
|
||||
|
||||
return $arguments;
|
||||
|
||||
Reference in New Issue
Block a user