Skip to content

Commit 6969b54

Browse files
committed
Merge pull request #218 from magento-mpi/MAGETWO-37552
[MPI] Bugs
2 parents 2bcd7f3 + 96b12f1 commit 6969b54

File tree

1 file changed

+9
-16
lines changed

1 file changed

+9
-16
lines changed

app/code/Magento/Deploy/Console/Command/DeployStaticContentCommand.php

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
namespace Magento\Deploy\Console\Command;
88

9+
use Magento\Framework\App\Utility\Files;
910
use Symfony\Component\Console\Command\Command;
1011
use Symfony\Component\Console\Input\InputOption;
1112
use Symfony\Component\Console\Input\InputInterface;
@@ -70,6 +71,7 @@ public function __construct(
7071

7172
/**
7273
* {@inheritdoc}
74+
* @throws \InvalidArgumentException
7375
*/
7476
protected function configure()
7577
{
@@ -109,22 +111,13 @@ protected function execute(InputInterface $input, OutputInterface $output)
109111
}
110112
}
111113

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);
115116

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);
129122
}
130123
}

0 commit comments

Comments
 (0)