From b5187cbc739cea5dc8775cc43df3e898f987d810 Mon Sep 17 00:00:00 2001 From: Moshe Weitzman Date: Wed, 29 Nov 2023 08:44:58 -0500 Subject: [PATCH] Avoid TypeError when calling a Drush command inside of php:cli (#5824) --- src/Psysh/DrushCommand.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Psysh/DrushCommand.php b/src/Psysh/DrushCommand.php index 5a453d6b11..7248094f54 100644 --- a/src/Psysh/DrushCommand.php +++ b/src/Psysh/DrushCommand.php @@ -60,7 +60,7 @@ protected function configure(): void /** * {@inheritdoc} */ - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { $args = $input->getArguments(); $first = array_shift($args); @@ -88,6 +88,8 @@ protected function execute(InputInterface $input, OutputInterface $output) } else { $output->page($process->getOutput()); } + + return $process->getExitCode(); } /**