Example #1
0
 protected function doRunCommand(Command $command, InputInterface $input, OutputInterface $output)
 {
     if ($command instanceof \Owncloud\Updater\Command\Command) {
         $command->setContainer($this->getContainer());
         $commandName = $this->getCommandName($input);
         $this->getLogger()->info('Execution of ' . $commandName . ' command started');
         if (!empty($command->getMessage())) {
             $message = sprintf('<info>%s</info>', $command->getMessage());
             $output->writeln($message);
         }
         $exitCode = parent::doRunCommand($command, $input, $output);
         $this->getLogger()->info('Execution of ' . $commandName . ' command stopped. Exit code is ' . $exitCode);
     } else {
         $exitCode = parent::doRunCommand($command, $input, $output);
     }
     return $exitCode;
 }