Fix incorrect timeout in init commands

This commit is contained in:
Alejandro Celaya
2023-06-15 18:53:42 +02:00
parent 228bd83b75
commit b17c576a30
5 changed files with 22 additions and 5 deletions

View File

@@ -23,8 +23,8 @@ class ProcessRunner implements ProcessRunnerInterface
public function __construct(private ProcessHelper $helper, ?callable $createProcess = null)
{
$this->createProcess = $createProcess !== null
? Closure::fromCallable($createProcess)
: static fn (array $cmd) => new Process($cmd, null, null, null, LockedCommandConfig::DEFAULT_TTL);
? $createProcess(...)
: static fn (array $cmd) => new Process($cmd, timeout: LockedCommandConfig::DEFAULT_TTL);
}
public function run(OutputInterface $output, array $cmd): void