protected function runOtherCommand($name, array $arguments = [], OutputInterface $output = null)
{
/** @var \Platformsh\Cli\Application $application */
$application = $this->getApplication();
$command = $application->find($name);
// Pass on interactivity arguments to the other command.
if (isset($this->input)) {
$arguments += ['--yes' => $this->input->getOption('yes'), '--no' => $this->input->getOption('no')];
}
$cmdInput = new ArrayInput(['command' => $name] + $arguments);
$cmdInput->setInteractive(self::$interactive);
$this->debug('Running command: ' . $name);
$application->setCurrentCommand($command);
$result = $command->run($cmdInput, $output ?: $this->output);
$application->setCurrentCommand($this);
return $result;
}