Skip to content

Commit

Permalink
Avoid TypeError when calling a Drush command inside of php:cli (#5824)
Browse files Browse the repository at this point in the history
  • Loading branch information
weitzman authored Nov 29, 2023
1 parent c21a5a2 commit b5187cb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Psysh/DrushCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -88,6 +88,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
} else {
$output->page($process->getOutput());
}

return $process->getExitCode();
}

/**
Expand Down

0 comments on commit b5187cb

Please sign in to comment.