X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=vendor%2Fdrupal%2Fconsole-core%2Fsrc%2FCommand%2FExec%2FExecCommand.php;fp=vendor%2Fdrupal%2Fconsole-core%2Fsrc%2FCommand%2FExec%2FExecCommand.php;h=958b4474d4febde1b3e50baf1e6ddcaaff32a644;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hp=4b3f283f512e251deb73cc69e5ecbd8a6b26180b;hpb=aea91e65e895364e460983b890e295aa5d5540a5;p=yaffs-website diff --git a/vendor/drupal/console-core/src/Command/Exec/ExecCommand.php b/vendor/drupal/console-core/src/Command/Exec/ExecCommand.php index 4b3f283f5..958b4474d 100644 --- a/vendor/drupal/console-core/src/Command/Exec/ExecCommand.php +++ b/vendor/drupal/console-core/src/Command/Exec/ExecCommand.php @@ -7,15 +7,13 @@ namespace Drupal\Console\Core\Command\Exec; -use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Process\ExecutableFinder; -use Drupal\Console\Core\Command\Shared\CommandTrait; use Drupal\Console\Core\Utils\ShellProcess; -use Drupal\Console\Core\Style\DrupalStyle; +use Drupal\Console\Core\Command\Command; /** * Class ExecCommand @@ -24,8 +22,6 @@ use Drupal\Console\Core\Style\DrupalStyle; */ class ExecCommand extends Command { - use CommandTrait; - /** * @var ShellProcess */ @@ -67,12 +63,11 @@ class ExecCommand extends Command */ protected function execute(InputInterface $input, OutputInterface $output) { - $io = new DrupalStyle($input, $output); $bin = $input->getArgument('bin'); $workingDirectory = $input->getOption('working-directory'); if (!$bin) { - $io->error( + $this->getIo()->error( $this->trans('commands.exec.messages.missing-bin') ); @@ -86,7 +81,7 @@ class ExecCommand extends Command $finder = new ExecutableFinder(); if (!$finder->find($name)) { - $io->error( + $this->getIo()->error( sprintf( $this->trans('commands.exec.messages.binary-not-found'), $name @@ -97,18 +92,18 @@ class ExecCommand extends Command } if (!$this->shellProcess->exec($bin, $workingDirectory)) { - $io->error( + $this->getIo()->error( sprintf( $this->trans('commands.exec.messages.invalid-bin') ) ); - $io->writeln($this->shellProcess->getOutput()); + $this->getIo()->writeln($this->shellProcess->getOutput()); return 1; } - $io->success( + $this->getIo()->success( sprintf( $this->trans('commands.exec.messages.success'), $bin