update patch 1
This commit is contained in:
@@ -20,15 +20,14 @@ use Symfony\Component\Process\Process;
|
||||
*/
|
||||
class ProcessFailedException extends RuntimeException
|
||||
{
|
||||
private Process $process;
|
||||
|
||||
public function __construct(Process $process)
|
||||
{
|
||||
public function __construct(
|
||||
private Process $process,
|
||||
) {
|
||||
if ($process->isSuccessful()) {
|
||||
throw new InvalidArgumentException('Expected a failed process, but the given process was successful.');
|
||||
}
|
||||
|
||||
$error = sprintf('The command "%s" failed.'."\n\nExit Code: %s(%s)\n\nWorking directory: %s",
|
||||
$error = \sprintf('The command "%s" failed.'."\n\nExit Code: %s(%s)\n\nWorking directory: %s",
|
||||
$process->getCommandLine(),
|
||||
$process->getExitCode(),
|
||||
$process->getExitCodeText(),
|
||||
@@ -36,7 +35,7 @@ class ProcessFailedException extends RuntimeException
|
||||
);
|
||||
|
||||
if (!$process->isOutputDisabled()) {
|
||||
$error .= sprintf("\n\nOutput:\n================\n%s\n\nError Output:\n================\n%s",
|
||||
$error .= \sprintf("\n\nOutput:\n================\n%s\n\nError Output:\n================\n%s",
|
||||
$process->getOutput(),
|
||||
$process->getErrorOutput()
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user