update patch 1
This commit is contained in:
@@ -18,15 +18,15 @@ use Symfony\Component\Process\Process;
|
||||
*/
|
||||
class ProcessStartFailedException extends ProcessFailedException
|
||||
{
|
||||
private Process $process;
|
||||
|
||||
public function __construct(Process $process, ?string $message)
|
||||
{
|
||||
public function __construct(
|
||||
private Process $process,
|
||||
?string $message,
|
||||
) {
|
||||
if ($process->isStarted()) {
|
||||
throw new InvalidArgumentException('Expected a process that failed during startup, but the given process was started successfully.');
|
||||
}
|
||||
|
||||
$error = sprintf('The command "%s" failed.'."\n\nWorking directory: %s\n\nError: %s",
|
||||
$error = \sprintf('The command "%s" failed.'."\n\nWorking directory: %s\n\nError: %s",
|
||||
$process->getCommandLine(),
|
||||
$process->getWorkingDirectory(),
|
||||
$message ?? 'unknown'
|
||||
@@ -34,8 +34,6 @@ class ProcessStartFailedException extends ProcessFailedException
|
||||
|
||||
// Skip parent constructor
|
||||
RuntimeException::__construct($error);
|
||||
|
||||
$this->process = $process;
|
||||
}
|
||||
|
||||
public function getProcess(): Process
|
||||
|
||||
Reference in New Issue
Block a user