|
6 | 6 |
|
7 | 7 | namespace Magento\Deploy\Console\Command;
|
8 | 8 |
|
| 9 | +use Magento\Framework\App\Utility\Files; |
9 | 10 | use Symfony\Component\Console\Command\Command;
|
10 | 11 | use Symfony\Component\Console\Input\InputOption;
|
11 | 12 | use Symfony\Component\Console\Input\InputInterface;
|
@@ -70,6 +71,7 @@ public function __construct(
|
70 | 71 |
|
71 | 72 | /**
|
72 | 73 | * {@inheritdoc}
|
| 74 | + * @throws \InvalidArgumentException |
73 | 75 | */
|
74 | 76 | protected function configure()
|
75 | 77 | {
|
@@ -109,22 +111,13 @@ protected function execute(InputInterface $input, OutputInterface $output)
|
109 | 111 | }
|
110 | 112 | }
|
111 | 113 |
|
112 |
| - try { |
113 |
| - // run the deployment logic |
114 |
| - $filesUtil = $this->objectManager->create('\Magento\Framework\App\Utility\Files'); |
| 114 | + // run the deployment logic |
| 115 | + $filesUtil = $this->objectManager->create(Files::class); |
115 | 116 |
|
116 |
| - $deployer = $this->objectManager->create( |
117 |
| - 'Magento\Deploy\Model\Deployer', |
118 |
| - ['filesUtil' => $filesUtil, 'output' => $output, 'isDryRun' => $options[self::DRY_RUN_OPTION]] |
119 |
| - ); |
120 |
| - $deployer->deploy($this->objectManagerFactory, $languages); |
121 |
| - |
122 |
| - } catch (\Exception $e) { |
123 |
| - $output->writeln('<error>' . $e->getMessage() . '</error>>'); |
124 |
| - if ($output->getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE) { |
125 |
| - $output->writeln($e->getTraceAsString()); |
126 |
| - } |
127 |
| - return; |
128 |
| - } |
| 117 | + $deployer = $this->objectManager->create( |
| 118 | + 'Magento\Deploy\Model\Deployer', |
| 119 | + ['filesUtil' => $filesUtil, 'output' => $output, 'isDryRun' => $options[self::DRY_RUN_OPTION]] |
| 120 | + ); |
| 121 | + $deployer->deploy($this->objectManagerFactory, $languages); |
129 | 122 | }
|
130 | 123 | }
|
0 commit comments